version: '3' x-env-shared: &env-shared environment: - TZ=UTC - PUBLIC_URL=http://localhost - PUBLIC_SERVER_URL=http://localhost/api - PUBLIC_GOOGLE_CLIENT_ID= x-env-database: &env-database environment: - POSTGRES_DB=postgres - POSTGRES_USER=postgres - POSTGRES_PASSWORD=postgres x-env-server: &env-server environment: - SECRET_KEY= - POSTGRES_HOST=postgres - POSTGRES_PORT=5432 - POSTGRES_SSL_CERT= - JWT_SECRET= - JWT_EXPIRY_TIME=604800 - PUBLIC_GOOGLE_CLIENT_ID= - GOOGLE_CLIENT_SECRET= - GOOGLE_API_KEY= - SENDGRID_API_KEY= - SENDGRID_FORGOT_PASSWORD_TEMPLATE_ID= - SENDGRID_FROM_NAME= - SENDGRID_FROM_EMAIL= x-env-flags: &env-flags environment: - PUBLIC_FLAG_DISABLE_SIGNUPS=false services: postgres: image: postgres:14.2-alpine container_name: postgres <<: *env-database ports: - 5432:5432 volumes: - pgdata:/var/lib/postgresql/data healthcheck: test: [ "CMD-SHELL", "pg_isready -U postgres" ] start_period: 15s interval: 30s timeout: 30s retries: 3 restart: always traefik: image: traefik:rocamadour container_name: traefik command: - --providers.docker=true - --providers.docker.exposedbydefault=false - --entrypoints.web.address=:80 ports: - 80:80 volumes: - /var/run/docker.sock:/var/run/docker.sock:ro server: image: amruthpillai/reactive-resume:server-latest container_name: server <<: *env-shared <<: *env-server <<: *env-database depends_on: - traefik - postgres labels: - traefik.enable=true - traefik.http.routers.server.entrypoints=web - traefik.http.routers.server.rule=Host(`localhost`) && PathPrefix(`/api/`) - traefik.http.routers.server.middlewares=server-stripprefix - traefik.http.middlewares.server-stripprefix.stripprefix.prefixes=/api - traefik.http.middlewares.server-stripprefix.stripprefix.forceslash=true restart: always client: image: amruthpillai/reactive-resume:client-latest container_name: client <<: *env-shared <<: *env-flags depends_on: - traefik - server labels: - traefik.enable=true - traefik.http.routers.client.rule=Host(`localhost`) - traefik.http.routers.client.entrypoints=web restart: always volumes: pgdata: