forked from ddlibrary/ddlibrary
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.staging.yml
74 lines (71 loc) · 1.84 KB
/
docker-compose.staging.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
72
73
74
version: "3.7"
networks:
ddlmain-network:
volumes:
dbdata:
driver: local
services:
web:
image: nginx:stable-alpine
container_name: web
volumes:
- ./public:/var/www/html/public
- ./storage/logs/:/var/log/nginx
- ./docker/nginx/conf.d/ddlmain.staging.temp.conf:/etc/nginx/conf.d/default.conf
# - ./docker/certbot/conf:/etc/letsencrypt
# - ./docker/certbot/www:/var/www/html/certbot
command: "/bin/sh -c 'while :; do sleep 6h & wait $${!}; nginx -s reload; done & nginx -g \"daemon off;\"'"
depends_on:
- app
restart: unless-stopped
ports:
- "80:80"
- "443:443"
networks:
- ddlmain-network
# certbot:
# image: certbot/certbot
# container_name: certbot
# volumes:
# - ./docker/certbot/conf:/etc/letsencrypt
# - ./docker/certbot/www:/var/www/certbot
# entrypoint: "/bin/sh -c 'trap exit TERM; while :; do certbot renew; sleep 12h & wait $${!}; done;'"
# restart: unless-stopped
# networks:
# - ddlmain-network
db:
image: mysql:5.7
container_name: db
environment:
MYSQL_DATABASE: ${DB_DATABASE}
MYSQL_ROOT_PASSWORD: ${DB_PASSWORD}
MYSQL_PASSWORD: ${DB_PASSWORD}
MYSQL_USER: ${DB_USERNAME}
volumes:
- ./docker/mysql/db.cnf:/etc/mysql/conf.d/my.cnf
- dbdata:/var/lib/mysql
tty: true
restart: unless-stopped
ports:
- "3306:3306"
networks:
- ddlmain-network
app:
build:
args:
PHP_VERSION: ${PHP_VERSION}
context: .
dockerfile: prod.Dockerfile
container_name: app
env_file:
- '.env'
volumes:
- ./docker/php/local.ini:/usr/local/etc/php/conf.d/local.ini
- ./vendor:/var/www/html/vendor
depends_on:
- db
restart: unless-stopped
ports:
- "9000:9000"
networks:
- ddlmain-network