version: '3.8' networks: doorcode: attachable: true configs: laravel_env: name: laravel_env-${CI_JOB_ID} file: $PROJ_DIR/.env secrets: webserver_cert: name: webserver_cert-${CI_JOB_ID} file: $WEBSERVER_CERT webserver_key: name: webserver_key-${CI_JOB_ID} file: $WEBSERVER_KEY root_cert: name: root_cert-${CI_JOB_ID} file: $ROOT_CERT wwu_webserver_cert: name: wwu_webserver_cert-${CI_JOB_ID} file: $WWU_WEBSERVER_CERT wwu_webserver_key: name: wwu_webserver_key-${CI_JOB_ID} file: $WWU_WEBSERVER_KEY wwu_root_cert: name: wwu_root_cert-${CI_JOB_ID} file: $WWU_ROOT_CERT postgres_password: name: postgres_password file: $POSTGRES_PASSWORD volumes: doorcode_db: external: true doorcode_pgadmin-data: external: true services: webserver: image: $NGINX_IMAGE_NAME healthcheck: test: [ "CMD", "curl", "--fail", "http://localhost/health" ] interval: 30s timeout: 3s retries: 3 secrets: - webserver_cert - webserver_key - root_cert - wwu_webserver_cert - wwu_webserver_key - wwu_root_cert ports: - target: 4433 published: 4433 mode: host - target: 443 published: 443 mode: host - target: 80 published: 80 mode: host volumes: - $PROJ_DIR/simple-saml/cert:/var/simplesamlphp/cert:ro - $PROJ_DIR/simple-saml/config:/var/simplesamlphp/config:ro - $PROJ_DIR/simple-saml/metadata:/var/simplesamlphp/metadata logging: options: max-size: "10m" max-file: "3" networks: - doorcode deploy: update_config: order: start-first failure_action: rollback delay: 5s rollback_config: parallelism: 0 order: stop-first postgres: image: postgres:13-alpine secrets: - postgres_password volumes: - doorcode_db:/var/lib/postgresql/data environment: POSTGRES_USER: web POSTGRES_PASSWORD_FILE: /run/secrets/postgres_password POSTGRES_DB: doorcode TZ: America/Los_Angeles logging: options: max-size: "10m" max-file: "3" networks: - doorcode dbadmin: image: dpage/pgadmin4:4.24 volumes: - doorcode_pgadmin-data:/var/lib/pgadmin environment: PGADMIN_DEFAULT_EMAIL: admin@elock PGADMIN_DEFAULT_PASSWORD: Please change the default password. logging: options: max-size: "10m" max-file: "3" networks: - doorcode api: image: $DOORCODE_IMAGE_NAME environment: TZ: America/Los_Angeles configs: - source: laravel_env target: /var/www/backend/.env healthcheck: test: [ "CMD", "/healthcheck.sh" ] interval: 30s timeout: 3s retries: 3 volumes: - $PROJ_DIR/controller-bins:/var/www/backend/storage/app/controller/binaries:ro - $PROJ_DIR/simple-saml/cert:/var/simplesamlphp/cert:ro - $PROJ_DIR/simple-saml/config:/var/simplesamlphp/config:ro - $PROJ_DIR/simple-saml/metadata:/var/simplesamlphp/metadata logging: options: max-size: "10m" max-file: "3" networks: - doorcode deploy: update_config: order: start-first failure_action: rollback delay: 5s rollback_config: parallelism: 0 order: stop-first