forked from jmp-app/jmp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
64 lines (59 loc) · 1.19 KB
/
docker-compose.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
version: '3'
volumes:
dbdata:
driver: local
services:
# PHP
app:
build:
context: api
dockerfile: Dockerfile
args:
- http_proxy
- https_proxy
- no_proxy
container_name: app
restart: unless-stopped
tty: true
depends_on:
- db
working_dir: /var/www
env_file:
- api/db.env
- api/.env
volumes:
- ./api/:/var/www
# Nginx
webserver:
image: nginx:alpine
container_name: webserver
restart: unless-stopped
tty: true
ports:
- "80:80"
- "443:443"
volumes:
- ./docker/log/nginx/:/var/log/nginx/
- ./docker/nginx/conf.d/:/etc/nginx/conf.d/
- ./vue/dist/:/var/www/public
# MariaDB
db:
image: mariadb:10.4
container_name: db
restart: unless-stopped
tty: true
ports:
- "3306:3306"
environment:
SERVICE_TAGS: dev
SERVICE_NAME: mysql
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/