services: postgres: image: postgres:18-alpine environment: POSTGRES_USER: subroutine POSTGRES_PASSWORD: subroutine POSTGRES_DB: subroutine ports: - "5432:5432" volumes: - postgres-data:/var/lib/postgresql/data healthcheck: test: ["CMD-SHELL", "pg_isready -U subroutine"] interval: 3s timeout: 5s retries: 20 start_period: 10s sandbox: build: context: . dockerfile: ./sandbox/Dockerfile ports: - "3000:80" volumes: - ./sandbox:/app/sandbox - ./eslint:/app/eslint cap_add: - SYS_ADMIN security_opt: - apparmor:unconfined - seccomp:unconfined healthcheck: test: ["CMD", "curl", "-f", "http://localhost/_status"] interval: 3s timeout: 5s retries: 20 start_period: 10s api: build: context: . dockerfile: ./api/Dockerfile ports: - "3002:80" environment: DATABASE_URL: postgresql://subroutine:subroutine@postgres:5432/subroutine volumes: - api-node-modules:/app/api/node_modules - ./api:/app/api - ./eslint:/app/eslint healthcheck: test: ["CMD", "curl", "-f", "http://localhost/status"] interval: 3s timeout: 5s retries: 20 start_period: 10s depends_on: postgres: condition: service_healthy sandbox: condition: service_healthy admin-panel: build: context: . dockerfile: ./admin-panel/Dockerfile ports: - "3001:80" volumes: - admin-panel-node-modules:/app/admin-panel/node_modules - admin-panel-react-router:/app/admin-panel/.react-router - admin-panel-vite:/app/admin-panel/.vite - ./admin-panel:/app/admin-panel - ./eslint:/app/eslint healthcheck: test: ["CMD", "curl", "-f", "http://localhost/"] interval: 3s timeout: 5s retries: 20 start_period: 10s tests: build: context: . dockerfile: ./tests/Dockerfile volumes: - ./tests:/app/tests depends_on: sandbox: condition: service_healthy api: condition: service_healthy admin-panel: condition: service_healthy volumes: postgres-data: driver: local api-node-modules: driver: local admin-panel-node-modules: driver: local admin-panel-react-router: driver: local admin-panel-vite: driver: local