-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
73 lines (68 loc) · 1.55 KB
/
docker-compose.dev.yml
File metadata and controls
73 lines (68 loc) · 1.55 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
version: "3.9"
services:
db:
image: postgres:16-alpine
restart: unless-stopped
environment:
POSTGRES_DB: app
POSTGRES_USER: app
POSTGRES_PASSWORD: change_me
volumes:
- db_data:/var/lib/postgresql/data
ports:
- "5432:5432"
backend:
build:
context: ./back-end
container_name: app-backend-dev
restart: unless-stopped
volumes:
- ./back-end:/var/www/html
environment:
APP_ENV: dev
APP_DEBUG: "1"
DATABASE_URL: ${DATABASE_URL}
CORS_ALLOW_ORIGIN: ${CORS_ALLOW_ORIGIN}
JWT_PRIVATE_KEY: ${JWT_PRIVATE_KEY}
JWT_PUBLIC_KEY: ${JWT_PUBLIC_KEY}
JWT_PASSPHRASE: ${JWT_PASSPHRASE}
JWT_TOKEN_TTL: ${JWT_TOKEN_TTL}
depends_on:
- db
ports:
- "8001:8000"
command: >
sh -c "
composer install &&
php bin/console doctrine:migrations:migrate --no-interaction &&
symfony server:start --no-tls --allow-http --port=8000
"
frontend:
build:
context: ./front-end
container_name: app-frontend-dev
restart: unless-stopped
volumes:
- ./front-end:/app
- /app/node_modules
environment:
NEXT_PUBLIC_API_URL: ${NEXT_PUBLIC_API_URL}
ports:
- "3000:3000"
command: npm run dev
caddy:
image: caddy:2-alpine
restart: unless-stopped
ports:
- "8080:80"
volumes:
- ./Caddyfile:/etc/caddy/Caddyfile:ro
- caddy_data:/data
- caddy_config:/config
depends_on:
- backend
- frontend
volumes:
db_data:
caddy_data:
caddy_config: