-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
71 lines (65 loc) · 1.37 KB
/
docker-compose.yml
File metadata and controls
71 lines (65 loc) · 1.37 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
services:
# --- Frontend build stage ---
# Run with: docker compose --profile frontend up frontend
frontend:
profiles: ["frontend"]
image: node:20-alpine
working_dir: /app
volumes:
- ../live-mobile-web:/app
- frontend-dist:/app/static
environment:
- VITE_BASE_URL=/static/
command: sh -c "npm ci --prefer-offline && npm run build"
networks: []
# --- Backend ---
app:
build: .
image: live-server
ports:
- "8082:80"
environment:
- CI_ENV=production
- DB_HOST=database
- DB_NAME=qulive
- DB_USER=root
- DB_PASS=WeImg4096
- REDIS_HOST=redis
volumes:
- ./:/var/www/html
depends_on:
- database
- redis
networks:
- live-net
web:
image: nginx:alpine
ports:
- "8088:80"
volumes:
- ./:/var/www/html
- ./nginx.conf:/etc/nginx/conf.d/default.conf:ro
- frontend-dist:/var/www/html/public/static:ro
depends_on:
- app
networks:
- live-net
database:
image: mysql:5.7
environment:
- MYSQL_ROOT_PASSWORD=WeImg4096
- MYSQL_DATABASE=qulive
volumes:
- mysql_data:/var/lib/mysql
- ./db:/docker-entrypoint-initdb.d
networks:
- live-net
redis:
image: redis:7-alpine
networks:
- live-net
networks:
live-net:
volumes:
mysql_data:
frontend-dist: