forked from jmp-app/jmp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.prod.yml
71 lines (65 loc) · 1.27 KB
/
docker-compose.prod.yml
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
version: '3'
volumes:
dbdata:
driver: local
services:
# PHP
app:
build:
context: api
dockerfile: Dockerfile.prod
args:
- http_proxy
- https_proxy
- no_proxy
container_name: app
restart: unless-stopped
tty: true
depends_on:
- db
env_file:
- api/db.env
- api/.env
# Nginx
webserver:
image: nginx:alpine
container_name: webserver
restart: unless-stopped
tty: true
depends_on:
- app
- frontend
ports:
- "80:80"
volumes:
- ./docker/nginx/conf.d.prod/:/etc/nginx/conf.d/
- ./vue/dist/:/var/www/public
frontend:
build:
context: vue
dockerfile: Dockerfile
args:
- http_proxy
- https_proxy
- no_proxy
- API=http://localhost/api
container_name: frontend
depends_on:
- app
# MariaDB
db:
image: mariadb:10.4
container_name: db
restart: unless-stopped
ports:
- "3306:3306"
env_file:
- api/db.env
- db.env
healthcheck:
test: mysql --protocol=TCP -hlocalhost -u$$DB_USERNAME -p$$DB_PASSWORD -e 'SELECT 1'
interval: 1s
timeout: 1s
volumes:
- dbdata:/var/lib/mysql/
- ./docker/db/:/docker-entrypoint-initdb.d/