version: '3' services: postgres: image: postgres:18 environment: - POSTGRES_PASSWORD=mysecretpassword ports: - 5432:5432 backend: build: backend command: wait-for-it postgres:5432 -s -t 0 -- cargo run environment: - DATABASE_URL=postgresql://postgres:mysecretpassword@postgres:5432/postgres - FRONTEND=/frontend - RUST_BACKTRACE=1 - RUST_LOG=info links: - postgres ports: - 5000:5000 restart: unless-stopped frontend: build: dockerfile: frontend/Dockerfile context: . restart: unless-stopped ports: - 9000:9000 environment: # See https://vite.dev/config/server-options#server-allowedhosts __VITE_ADDITIONAL_SERVER_ALLOWED_HOSTS: "frontend" nginx: image: nginx:1.19.1 volumes: - ./nginx/localhost.key:/etc/ssl/localhost.key - ./nginx/localhost.crt:/etc/ssl/localhost.crt - ./nginx/nginx.conf:/etc/nginx/nginx.conf ports: - 8000:8000 links: - backend - frontend