services: postgres: image: postgres environment: POSTGRES_DB: apfel POSTGRES_USER: apfel POSTGRES_PASSWORD: apfel PGDATA: /data/postgres volumes: - db:/data/postgres ports: - "5432:5432" networks: - apfelnetzwerk restart: unless-stopped backend: build: context: . dockerfile: Dockerfile-backend ports: - "8080:8080" networks: - apfelnetzwerk depends_on: - postgres env_file: - .env restart: unless-stopped frontend: build: context: . dockerfile: Dockerfile-frontend ports: - "3000:3000" depends_on: - backend restart: unless-stopped networks: apfelnetzwerk: driver: bridge volumes: db: