diff --git a/docker-compose.yml b/docker-compose.yml index 558b19f..9bd1d36 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,10 +1,16 @@ +name: tangled services: knot: + image: tngl/knot:latest build: - context: . + target: knot args: UID: 1000 GID: 1000 + TAG: ${TAG:-v1.11.0-alpha} + tags: + - tngl/spindle:latest + - tngl/spindle:${TAG:-v1.11.0-alpha} environment: KNOT_SERVER_HOSTNAME: ${KNOT_SERVER_HOSTNAME} KNOT_SERVER_OWNER: ${KNOT_SERVER_OWNER} @@ -19,15 +25,35 @@ services: - "5555:5555" - "2222:22" restart: always + spindle: + image: tngl/spindle:latest + build: + target: spindle + args: + UID: 1000 + GID: 1000 + TAG: ${TAG:-v1.11.0-alpha} + tags: + - tngl/spindle:latest + - tngl/spindle:${TAG:-v1.11.0-alpha} + environment: + SPINDLE_SERVER_HOSTNAME: ${SPINDLE_SERVER_HOSTNAME} + SPINDLE_SERVER_OWNER: ${KNOT_SERVER_OWNER} + volumes: + - ./logs:/var/log/spindle + - ./spindle:/app + ports: + - "6555:6555" frontend: image: caddy:alpine - command: > - caddy - reverse-proxy - --from ${KNOT_SERVER_HOSTNAME} - --to knot:5555 depends_on: - - knot + knot: + condition: service_healthy + spindle: + condition: service_healthy + configs: + - source: caddyfile + target: /etc/caddy/Caddyfile ports: - ${KNOT_SERVER_PORT:-443}:443 - ${KNOT_SERVER_PORT:-443}:443/udp @@ -35,3 +61,8 @@ services: - ./caddy_data:/data restart: always profiles: ["caddy"] +configs: + caddyfile: + content: | + ${KNOT_SERVER_HOSTNAME} { reverse_proxy knot:5555 } + ${SPINDLE_SERVER_HOSTNAME} { reverse_proxy spindle:6555 }