version: '3.8'
services:
backend:
build:
context: ./backend
container_name: laravel-app
ports:
- "9001:9001"
volumes:
- ./backend:/var/www
environment:
- APP_ENV=local
- APP_DEBUG=true
- APP_KEY=base64:APP_KEY
- DB_HOST=db
- DB_PORT=3306
- DB_DATABASE=laravel
- DB_USERNAME=root
- DB_PASSWORD=root
depends_on:
- db
frontend:
build:
context: ./frontend
container_name: nextjs-app
ports:
- "3000:3000"
volumes:
- ./frontend:/app
environment:
- NEXT_PUBLIC_API_URL=http://localhost:9001/api
db:
image: mysql:8.0
container_name: mysql-db
ports:
- "3306:3306"
volumes:
- db-data:/var/lib/mysql
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: laravel
MYSQL_USER: root
MYSQL_PASSWORD: root
volumes:
db-data:
|