diff --git a/compose.example.yml b/compose.example.yml index f27f6f0..34f9a10 100755 --- a/compose.example.yml +++ b/compose.example.yml @@ -9,6 +9,7 @@ services: - ALLOW_RESTARTS=1 - CONTAINERS=1 - EVENTS=1 + - INFO=1 - PING=1 - POST=1 - VERSION=1 @@ -19,12 +20,6 @@ services: - /run ports: - ${SOCKET_PROXY_LISTEN_ADDR:-127.0.0.1:2375}:2375 - healthcheck: - test: ["CMD", "curl", "-f", "http://localhost:2375"] - interval: 1m30s - timeout: 30s - retries: 5 - start_period: 30s frontend: image: ghcr.io/yusing/godoxy-frontend:${TAG:-latest} container_name: godoxy-frontend @@ -60,6 +55,9 @@ services: network_mode: host # do not change this env_file: .env user: ${GODOXY_UID:-1000}:${GODOXY_GID:-1000} + depends_on: + socket-proxy: + condition: service_started security_opt: - no-new-privileges:true cap_drop: diff --git a/scripts/setup.sh b/scripts/setup.sh index dbbc451..abaa381 100755 --- a/scripts/setup.sh +++ b/scripts/setup.sh @@ -24,7 +24,7 @@ if [ "$EUID" -eq 0 ]; then fi # check if user has docker permission -if [ -z "$(docker ps >/dev/null 2>&1)" ]; then +if ! docker ps > /dev/null 2>&1; then echo "Error: User $USER does not have permission to run docker, please add it to docker group" exit 1 fi @@ -206,7 +206,7 @@ echo "Setting up login user" ask_while_empty "Enter login username: " LOGIN_USERNAME ask_while_empty "Enter login password: " LOGIN_PASSWORD echo "Setting up login user \"$LOGIN_USERNAME\" with password \"$LOGIN_PASSWORD\"" -setenv "GODOXY_API_USERNAME" "$LOGIN_USERNAME" +setenv "GODOXY_API_USER" "$LOGIN_USERNAME" setenv "GODOXY_API_PASSWORD" "$LOGIN_PASSWORD" # 6. setup autocert