/
/
/
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 deploy:
37 resources:
38 limits:
39 memory: {{ resource_profiles.standard.memory_limit }}
40 cpus: '{{ resource_profiles.standard.cpu_limit }}'
41
42 ghost-mysql:
43 container_name: ghost-mysql
44 image: {{ container_images.mysql }}
45 restart: unless-stopped
46
47 environment:
48 - TZ={{ runner_timezone }}
49 - MYSQL_ROOT_PASSWORD={{ mysql_root_password }}
50 - MYSQL_DATABASE={{ ghost_db_name }}
51 - MYSQL_USER={{ ghost_db_user }}
52 - MYSQL_PASSWORD={{ ghost_database_password }}
53
54 volumes:
55 - {{ ghost_config_dir }}/mysql:/var/lib/mysql
56
57 networks:
58 - {{ runner_docker_network }}
59
60 deploy:
61 resources:
62 limits:
63 memory: {{ mysql_memory_limit }}
64 cpus: '{{ mysql_cpu_limit }}'
65
66 command: >
67 --default-authentication-plugin=mysql_native_password
68 --character-set-server=utf8mb4
69 --collation-server=utf8mb4_unicode_ci
70 --innodb-buffer-pool-size=256M
71 --max-connections=100
72
73networks:
74 {{ runner_docker_network }}:
75 external: true