version: '3.7' networks: doorcode: driver: bridge secrets: webserver_cert: file: ./secrets/certs/webserver.cert webserver_key: file: ./secrets/certs/webserver.key root_cert: file: ./secrets/certs/root.cert volumes: db-data: pgadmin-data: services: webserver: image: nginx:1-alpine container_name: webserver restart: unless-stopped tty: true secrets: - webserver_cert - webserver_key - root_cert ports: - "8080:443" volumes: - ./src:/var/www - ./nginx/conf.d/app.conf:/etc/nginx/conf.d/app.conf - ./nginx/dhparam/:/run/dhparam # Saml config - ./simplesamlphp-1.19.0-rc1:/var/simplesamlphp - ./simple-saml/cert:/var/simplesamlphp/cert - ./simple-saml/config:/var/simplesamlphp/config - ./simple-saml/metadata:/var/simplesamlphp/metadata - ./simplesamlphp-1.19.0-rc1:/var/simplesamlphp-idp - ./simple-saml-idp/cert:/var/simplesamlphp-idp/cert - ./simple-saml-idp/config:/var/simplesamlphp-idp/config - ./simple-saml-idp/metadata:/var/simplesamlphp-idp/metadata depends_on: - dbadmin - api logging: options: max-size: "10m" max-file: "3" networks: - doorcode postgres: image: postgres:13-alpine container_name: postgres restart: unless-stopped tty: true ports: - "5432:5432" volumes: - db-data:/var/lib/postgresql/data environment: POSTGRES_USER: web POSTGRES_PASSWORD: secret POSTGRES_DB: doorcode logging: options: max-size: "10m" max-file: "3" networks: - doorcode dbadmin: image: dpage/pgadmin4:latest container_name: dbadmin restart: unless-stopped tty: true ports: - "8081:80" depends_on: - postgres volumes: - pgadmin-data:/var/lib/pgadmin environment: PGADMIN_DEFAULT_EMAIL: admin@elock PGADMIN_DEFAULT_PASSWORD: secret logging: options: max-size: "10m" max-file: "3" networks: - doorcode api: build: context: . dockerfile: Dockerfile container_name: api volumes: - ./src:/var/www - ./php/dev.ini:/usr/local/etc/php/conf.d/local.ini # Map saml files to the php-fpm server so it has access to them as well - ./simplesamlphp-1.19.0-rc1:/var/simplesamlphp - ./simple-saml/cert:/var/simplesamlphp/cert - ./simple-saml/config:/var/simplesamlphp/config - ./simple-saml/metadata:/var/simplesamlphp/metadata - ./simplesamlphp-1.19.0-rc1:/var/simplesamlphp-idp - ./simple-saml-idp/cert:/var/simplesamlphp-idp/cert - ./simple-saml-idp/config:/var/simplesamlphp-idp/config - ./simple-saml-idp/metadata:/var/simplesamlphp-idp/metadata ports: - "8000:8000" logging: options: max-size: "10m" max-file: "3" networks: - doorcode