-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.dev.yaml
More file actions
88 lines (82 loc) · 2.39 KB
/
docker-compose.dev.yaml
File metadata and controls
88 lines (82 loc) · 2.39 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
services:
nginx:
build:
context: ./nginx/dev
dockerfile: Dockerfile
ports:
- "80:80"
volumes:
- ./nginx/dev/config/nginx:/etc/nginx
- ./nginx/dev/share/index.html:/usr/share/nginx/html/index.html
restart: on-failure:5
extra_hosts:
- "host.docker.internal:host-gateway"
networks:
- guaradata-backend
ghost_mysql:
image: mysql:8.0
restart: always
env_file: .env
environment:
- MYSQL_ROOT_PASSWORD=${DATABASE_PASSWORD}
- MYSQL_USER=${DATABASE_USER}
- MYSQL_PASSWORD=${DATABASE_USER_PASSWORD}
- MYSQL_DATABASE=${DATABASE_NAME}
ports:
- "3306:3306"
volumes:
- db:/var/lib/mysql
networks:
- guaradata-backend
ghost:
image: ghost:5-alpine
restart: always
env_file: .env
environment:
# see https://ghost.org/docs/config/#configuration-options
- database__client=${DATABASE_CLIENT}
- database__connection__host=${DATABASE_HOST}
- database__connection__user=${DATABASE_USER}
- database__connection__password=${DATABASE_PASSWORD}
- database__connection__database=${DATABASE_NAME}
# this url value is just an example, and is likely wrong for your environment!
- url=${GHOST_URL}
# contrary to the default mentioned in the linked documentation, this image defaults to NODE_ENV=production (so development mode needs to be explicitly specified if desired)
#NODE_ENV: development
volumes:
- ghost:/var/lib/ghost/content
networks:
- guaradata-backend
depends_on:
- ghost_mysql
mysql_backup:
image: mysql:8.0
profiles: ["backup"]
entrypoint: ["sh", "-c"]
command: >
"mysqldump --no-tablespaces -h ghost_mysql -u ${DATABASE_USER} -p${DATABASE_USER_PASSWORD} ${DATABASE_NAME} > /backups/backup.sql"
volumes:
- ./mysql_backups:/backups
depends_on:
- ghost_mysql
networks:
- guaradata-backend
env_file: .env
guaradata_portainer:
image: portainer/portainer-ce:alpine
container_name: portainer
restart: always
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- portainer_data:/data
networks:
- guaradata-backend
volumes:
ghost:
db:
portainer_data:
networks:
guaradata-backend:
driver: bridge
default:
external: true