-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
113 lines (113 loc) · 3.22 KB
/
docker-compose.yaml
File metadata and controls
113 lines (113 loc) · 3.22 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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
networks:
split-fairly:
services:
web:
image: ${NGINX_IMAGE}
ports:
- "8080:80"
volumes:
- ./backend:/var/www/project
- ./build/nginx/default.conf:/etc/nginx/conf.d/default.conf
depends_on:
- app
- worker
networks:
- split-fairly
app:
image: ${APP_IMAGE}
ports:
- "9000:9000"
volumes:
- ./backend:/var/www/project
depends_on:
db:
condition: service_healthy
environment:
APP_ENV: ${APP_ENV}
APP_VERSION: ${APP_VERSION}
DATABASE_URL: ${DATABASE_URL}
ADMIN_EMAIL: ${ADMIN_EMAIL}
ADMIN_PASSWORD: ${ADMIN_PASSWORD}
networks:
- split-fairly
worker:
image: ${APP_IMAGE}
volumes:
- ./backend:/var/www/project
# One-shot worker pattern: processes single message, then exits
# Prevents memory leaks and improves resource predictability
command:
- sh
- -c
- |
while true; do
bin/console messenger:consume async --limit=1 --time-limit=60 -vv
sleep 1
done
depends_on:
db:
condition: service_healthy
environment:
APP_ENV: ${APP_ENV}
APP_VERSION: ${APP_VERSION}
DATABASE_URL: ${DATABASE_URL}
ADMIN_EMAIL: ${ADMIN_EMAIL}
ADMIN_PASSWORD: ${ADMIN_PASSWORD}
networks:
- split-fairly
db:
image: ${MYSQL_IMAGE}
ports:
- "3306:3306"
volumes:
- mysql_data:/var/lib/mysql
environment:
MYSQL_ROOT_PASSWORD: secret
MYSQL_PASSWORD: secret
healthcheck:
test: mysqladmin ping -h 127.0.0.1 -u $$MYSQL_USER --password=$$MYSQL_PASSWORD
start_period: 5s
interval: 5s
timeout: 5s
retries: 55
networks:
- split-fairly
db-admin:
image: ${ADMINER_IMAGE}
environment:
ADMINER_DEFAULT_SERVER: db
ports:
- "8085:8080"
depends_on:
db:
condition: service_healthy
networks:
- split-fairly
dashboard:
image: ${DASHBOARD_IMAGE}
volumes:
- ./dashboard/assets:/www/assets
- ./backend/report:/www/public/report
- ./backend/coverage:/www/coverage
ports:
- "8000:8080"
user: "1000:1001"
restart: unless-stopped
networks:
- split-fairly
npm-dev:
image: ${NODE_IMAGE}
working_dir: /var/www/frontend
volumes:
- ./frontend:/var/www/frontend
- ./backend:/var/www/backend
ports:
- "5173:5173"
# command: ["sh", "-lc", "npm ci --no-audit --no-fund && npm run dev -- --host 0.0.0.0"]
command: ["sh", "-lc", "npm install --legacy-peer-deps && npm run dev -- --host 0.0.0.0"]
environment:
- CHOKIDAR_USEPOLLING=true
networks:
- split-fairly
volumes:
mysql_data: {}