-
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
executable file
·121 lines (113 loc) · 2.99 KB
/
docker-compose.yml
File metadata and controls
executable file
·121 lines (113 loc) · 2.99 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
114
115
116
117
118
119
120
121
networks:
net:
services:
postgres:
image: postgres:13.2
restart: unless-stopped
expose:
- "5432"
volumes:
- ./postgres/init:/docker-entrypoint-initdb.d/
- ./postgres/data:/var/lib/postgresql/data
environment:
- POSTGRES_PASSWORD=passwd
networks:
- net
logging:
driver: "json-file"
options:
max-size: "500k"
max-file: "10"
php:
image: nerdzeu/docker-php:1.1.1
restart: unless-stopped
expose:
- "9000"
depends_on:
- postgres
volumes:
# NOTE: the mount point MUST be the same of
# nginx, even if the php-fpm "desired" volume
# is different.
# This is needed because fastcgi passes the
# FULL path of the PHP script.
- ./php/websites:/srv/http
networks:
- net
logging:
driver: "json-file"
options:
max-size: "500k"
max-file: "10"
nginx:
image: nerdzeu/docker-nginx:1.0.0
restart: unless-stopped
ports:
- "80:80"
- "443:443"
depends_on:
- certbot
- php
- api
- camo
- apidoc
volumes:
- ./php/websites:/srv/http
- ./nginx/conf.d:/etc/nginx/conf.d
- ./certbot/conf:/etc/letsencrypt
- ./certbot/www:/var/www/certbot
entrypoint: "/bin/sh -c 'while :; do sleep 6h & wait $${!}; nginx -s reload -g \"daemon off; load_module /etc/nginx/modules/ngx_http_perl_module.so;\"; done & nginx -g \"daemon off; load_module /etc/nginx/modules/ngx_http_perl_module.so;\"'"
networks:
- net
logging:
driver: "json-file"
options:
max-size: "500k"
max-file: "10"
certbot:
image: certbot/certbot
restart: unless-stopped
volumes:
- ./certbot/conf:/etc/letsencrypt
- ./certbot/www:/var/www/certbot
entrypoint: "/bin/sh -c 'trap exit TERM; while :; do certbot renew; sleep 12h & wait $${!}; done;'"
networks:
- net
camo:
image: nerdzeu/docker-camo:1.0.0
restart: unless-stopped
expose:
- "8081"
environment:
- CAMO_KEY=WHYYOUSTUPIDCUNTSUCKER
networks:
- net
api:
image: nerdzeu/nerdz-api:1.0.6
restart: unless-stopped
expose:
- "8080"
depends_on:
- postgres
volumes:
- ./api/runtime:/go/runtime
- ./php/websites/nerdz.eu:/srv/http/nerdz.eu/
environment:
- CONF_FILE=/go/runtime/config.json
networks:
- net
logging:
driver: "json-file"
options:
max-size: "500k"
max-file: "10"
apidoc:
image: quay.io/goswagger/swagger:latest
restart: unless-stopped
expose:
- "40455"
volumes:
- ./api/doc/swagger:/api
entrypoint: "swagger serve --no-open -p 40455 --host=0.0.0.0 /api/swagger.json"
networks:
- net