/
/
/
1
2services:
3 ghost:
4 container_name: ghost
5 image: {{ container_images.ghost }}
6 restart: unless-stopped
7
8 environment:
9 - TZ={{ runner_timezone }}
10 - NODE_ENV=production
11 - url={{ ghost_url }}
12 - database__client={{ ghost_db_client }}
13 - database__connection__host=ghost-mysql
14 - database__connection__user={{ ghost_db_user }}
15 - database__connection__password={{ ghost_database_password }}
16 - database__connection__database={{ ghost_db_name }}
17 - mail__transport=Direct
18 - logging__level={{ ghost_logging }}
19
20 volumes:
21 # Ghost content directory
22 - {{ ghost_content_dir }}:/var/lib/ghost/content
23
24 # Configuration file
25 - {{ ghost_content_dir }}/config.production.json:/var/lib/ghost/config.production.json:ro
26
27 ports:
28 - "{{ ghost_port }}:2368"
29
30 depends_on:
31 - ghost-mysql
32
33 networks:
34 - {{ runner_docker_network }}
35
36 ghost-mysql:
37 container_name: ghost-mysql
38 image: {{ container_images.mysql }}
39 restart: unless-stopped
40
41 environment:
42 - MYSQL_ROOT_PASSWORD={{ mysql_root_password }}
43 - MYSQL_DATABASE={{ ghost_db_name }}
44 - MYSQL_USER={{ ghost_db_user }}
45 - MYSQL_PASSWORD={{ ghost_database_password }}
46
47 command: >
48 --default-authentication-plugin=mysql_native_password
49 --character-set-server=utf8mb4
50 --collation-server=utf8mb4_unicode_ci
51 --innodb-buffer-pool-size=256M
52 --max-connections=100
53
54 volumes:
55 - {{ ghost_config_dir }}/mysql:/var/lib/mysql
56
57 networks:
58 - {{ runner_docker_network }}
59
60networks:
61 {{ runner_docker_network }}:
62 external: true