forked from mybb/docker-compose
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml.pgsql.example
71 lines (67 loc) · 1.52 KB
/
docker-compose.yml.pgsql.example
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.4'
services:
nginx:
image: nginx:mainline-alpine
depends_on:
- mybb
logging:
driver: syslog
options:
tag: "{{.DaemonName}}(image={{.ImageName}};name={{.Name}};id={{.ID}})"
networks:
- frontend
ports:
- '8080:80'
restart: on-failure
volumes:
- ${PWD}/nginx:/etc/nginx/conf.d:ro
- ${PWD}/mybb:/var/www/html:ro
mybb:
build: php7.1/fpm
depends_on:
- memcached
- postgresql
logging:
driver: syslog
options:
tag: "{{.DaemonName}}(image={{.ImageName}};name={{.Name}};id={{.ID}})"
networks:
- frontend
- backend
restart: on-failure
volumes:
- ${PWD}/mybb:/var/www/html
postgresql:
image: postgres:10.1-alpine
environment:
POSTGRES_DB: mybb
POSTGRES_USER: mybb
POSTGRES_PASSWORD: changeme
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 30s
timeout: 30s
retries: 3
logging:
driver: syslog
options:
tag: "{{.DaemonName}}(image={{.ImageName}};name={{.Name}};id={{.ID}})"
networks:
- backend
restart: on-failure
volumes:
- ${PWD}/postgres/data:/var/lib/postgresql/data
memcached:
image: memcached:1.5.3-alpine
logging:
driver: syslog
options:
tag: "{{.DaemonName}}(image={{.ImageName}};name={{.Name}};id={{.ID}})"
networks:
- backend
restart: on-failure
networks:
frontend:
driver: bridge
backend:
driver: bridge