app/docker-compose.yml
2025-04-15 21:56:28 +02:00

45 lines
1 KiB
YAML

version: "3.8"
services:
db:
image: mysql:8.0
container_name: dishplanner-db
restart: unless-stopped
environment:
MYSQL_ROOT_PASSWORD: rootpassword
MYSQL_DATABASE: dishplanner
MYSQL_USER: dishuser
MYSQL_PASSWORD: dishpass
volumes:
- db_data:/var/lib/mysql
backend:
image: jochent/dishplanner-backend:latest
container_name: dishplanner-backend
restart: unless-stopped
environment:
DB_CONNECTION: mysql
DB_HOST: db
DB_PORT: 3306
DB_DATABASE: dishplanner
DB_USERNAME: dishuser
DB_PASSWORD: dishpass
depends_on:
- db
ports:
- "9000:9000" # Only needed if exposing php-fpm, otherwise remove
frontend:
image: jochent/dishplanner-frontend:latest
container_name: dishplanner-frontend
restart: unless-stopped
environment:
NEXT_PUBLIC_API_URL: http://localhost:9000 # or backend:9000 if hitting directly
depends_on:
- backend
ports:
- "3000:3000"
volumes:
db_data: