services: nextapp: container_name: nextapp image: francescoxx/nextapp:latest build: context: ./frontend dockerfile: next.dockerfile ports: - 3000:3000 environment: - NEXT_PUBLIC_API_URL=http://localhost:8080 depends_on: - rustapp rustapp: container_name: rustapp image: francescoxx/rustapp:latest build: context: ./backend dockerfile: rust.dockerfile args: DATABASE_URL: postgres://postgres:postgres@db:5432/postgres ports: - 8080:8080 depends_on: - db db: container_name: db image: postgres:13 environment: POSTGRES_USER: postgres POSTGRES_PASSWORD: postgres POSTGRES_DB: postgres ports: - 5432:5432 volumes: - pgdata:/var/lib/postgresql/data volumes: pgdata: {}