| 
									
										
										
										
											2023-06-10 14:46:05 +00:00
										 |  |  | version: "3.9"
 | 
					
						
							| 
									
										
										
										
											2022-08-03 19:29:10 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | services:
 | 
					
						
							|  |  |  |   ghost:
 | 
					
						
							| 
									
										
										
										
											2023-12-16 03:05:15 +00:00
										 |  |  |     image: ghost:5.75.2
 | 
					
						
							| 
									
										
										
										
											2022-08-03 19:29:10 +00:00
										 |  |  |     container_name: ghost
 | 
					
						
							|  |  |  |     depends_on:
 | 
					
						
							| 
									
										
										
										
											2023-06-10 14:46:05 +00:00
										 |  |  |       - ghostdb
 | 
					
						
							| 
									
										
										
										
											2022-08-03 19:29:10 +00:00
										 |  |  |     restart: unless-stopped
 | 
					
						
							|  |  |  |     ports:
 | 
					
						
							|  |  |  |       - ${APP_PORT}:2368
 | 
					
						
							|  |  |  |     environment:
 | 
					
						
							|  |  |  |       # see https://ghost.org/docs/config/#configuration-options
 | 
					
						
							|  |  |  |       database__client: mysql
 | 
					
						
							|  |  |  |       database__connection__host: ghostdb
 | 
					
						
							|  |  |  |       database__connection__user: tipi
 | 
					
						
							|  |  |  |       database__connection__password: ${GHOST_DATABASE_PASSWORD}
 | 
					
						
							|  |  |  |       database__connection__database: ghosttipi
 | 
					
						
							| 
									
										
										
										
											2023-08-29 20:34:30 +00:00
										 |  |  |       url: ${APP_PROTOCOL:-http}://${APP_DOMAIN}
 | 
					
						
							| 
									
										
										
										
											2022-08-03 19:29:10 +00:00
										 |  |  |     volumes:
 | 
					
						
							|  |  |  |       - ${APP_DATA_DIR}/content:/var/lib/ghost/content
 | 
					
						
							|  |  |  |     networks:
 | 
					
						
							|  |  |  |       - tipi_main_network
 | 
					
						
							| 
									
										
										
										
											2022-09-07 19:18:41 +00:00
										 |  |  |     labels:
 | 
					
						
							| 
									
										
										
										
											2023-06-10 14:46:05 +00:00
										 |  |  |       # Main
 | 
					
						
							|  |  |  |       traefik.enable: true
 | 
					
						
							|  |  |  |       traefik.http.middlewares.ghost-web-redirect.redirectscheme.scheme: https
 | 
					
						
							|  |  |  |       traefik.http.services.ghost.loadbalancer.server.port: 2368
 | 
					
						
							|  |  |  |       # Web
 | 
					
						
							|  |  |  |       traefik.http.routers.ghost-insecure.rule: Host(`${APP_DOMAIN}`)
 | 
					
						
							|  |  |  |       traefik.http.routers.ghost-insecure.entrypoints: web
 | 
					
						
							|  |  |  |       traefik.http.routers.ghost-insecure.service: ghost
 | 
					
						
							|  |  |  |       traefik.http.routers.ghost-insecure.middlewares: ghost-web-redirect
 | 
					
						
							|  |  |  |       # Websecure
 | 
					
						
							| 
									
										
										
										
											2022-09-07 19:18:41 +00:00
										 |  |  |       traefik.http.routers.ghost.rule: Host(`${APP_DOMAIN}`)
 | 
					
						
							|  |  |  |       traefik.http.routers.ghost.entrypoints: websecure
 | 
					
						
							|  |  |  |       traefik.http.routers.ghost.service: ghost
 | 
					
						
							|  |  |  |       traefik.http.routers.ghost.tls.certresolver: myresolver
 | 
					
						
							| 
									
										
										
										
											2023-06-10 14:46:05 +00:00
										 |  |  |       # Local domain
 | 
					
						
							|  |  |  |       traefik.http.routers.ghost-local-insecure.rule: Host(`ghost.${LOCAL_DOMAIN}`)
 | 
					
						
							|  |  |  |       traefik.http.routers.ghost-local-insecure.entrypoints: web
 | 
					
						
							|  |  |  |       traefik.http.routers.ghost-local-insecure.service: ghost
 | 
					
						
							|  |  |  |       traefik.http.routers.ghost-local-insecure.middlewares: ghost-web-redirect
 | 
					
						
							|  |  |  |       # Local domain secure
 | 
					
						
							|  |  |  |       traefik.http.routers.ghost-local.rule: Host(`ghost.${LOCAL_DOMAIN}`)
 | 
					
						
							|  |  |  |       traefik.http.routers.ghost-local.entrypoints: websecure
 | 
					
						
							|  |  |  |       traefik.http.routers.ghost-local.service: ghost
 | 
					
						
							|  |  |  |       traefik.http.routers.ghost-local.tls: true
 | 
					
						
							| 
									
										
										
										
											2022-08-03 19:29:10 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |   ghostdb:
 | 
					
						
							|  |  |  |     container_name: ghostdb
 | 
					
						
							|  |  |  |     image: mariadb:latest
 | 
					
						
							|  |  |  |     environment:
 | 
					
						
							|  |  |  |       MYSQL_ROOT_PASSWORD: ${GHOST_DATABASE_PASSWORD}
 | 
					
						
							|  |  |  |       MYSQL_USER: tipi
 | 
					
						
							|  |  |  |       MYSQL_PASSWORD: ${GHOST_DATABASE_PASSWORD}
 | 
					
						
							|  |  |  |       MYSQL_DATABASE: ghosttipi
 | 
					
						
							|  |  |  |     volumes:
 | 
					
						
							|  |  |  |       - ${APP_DATA_DIR}/data/db:/var/lib/mysql
 | 
					
						
							|  |  |  |     networks:
 | 
					
						
							| 
									
										
										
										
											2023-06-10 14:46:05 +00:00
										 |  |  |       - tipi_main_network
 |