| 
									
										
										
										
											2023-02-04 14:16:59 +00:00
										 |  |  | version: "3.7"
 | 
					
						
							|  |  |  | services:
 | 
					
						
							|  |  |  |   monica:
 | 
					
						
							| 
									
										
										
										
											2023-02-05 10:10:49 +00:00
										 |  |  |     image: monica:4.0.0
 | 
					
						
							|  |  |  |     container_name: monica
 | 
					
						
							| 
									
										
										
										
											2023-02-04 14:16:59 +00:00
										 |  |  |     depends_on:
 | 
					
						
							|  |  |  |       - monica-db
 | 
					
						
							|  |  |  |     ports:
 | 
					
						
							|  |  |  |       - ${APP_PORT}:80
 | 
					
						
							|  |  |  |     environment:
 | 
					
						
							| 
									
										
										
										
											2023-02-05 10:10:49 +00:00
										 |  |  |       - APP_KEY=${MONICA_APP_KEY}
 | 
					
						
							| 
									
										
										
										
											2023-02-04 14:16:59 +00:00
										 |  |  |       - DB_HOST=monica-db
 | 
					
						
							|  |  |  |       - DB_USERNAME=usermonica
 | 
					
						
							|  |  |  |       - DB_PASSWORD=${MONICA_DB_PASS}
 | 
					
						
							|  |  |  |     volumes:
 | 
					
						
							|  |  |  |       - ${APP_DATA_DIR}/data:/var/www/html/storage
 | 
					
						
							|  |  |  |     restart: unless-stopped
 | 
					
						
							|  |  |  |     networks:
 | 
					
						
							|  |  |  |       - tipi_main_network
 | 
					
						
							|  |  |  |     labels:
 | 
					
						
							| 
									
										
										
										
											2023-06-12 19:58:59 +00:00
										 |  |  |       # Main
 | 
					
						
							|  |  |  |       traefik.enable: true
 | 
					
						
							|  |  |  |       traefik.http.middlewares.monica-web-redirect.redirectscheme.scheme: https
 | 
					
						
							|  |  |  |       traefik.http.services.monica.loadbalancer.server.port: 80
 | 
					
						
							|  |  |  |       # Web
 | 
					
						
							|  |  |  |       traefik.http.routers.monica-insecure.rule: Host(`${APP_DOMAIN}`)
 | 
					
						
							|  |  |  |       traefik.http.routers.monica-insecure.entrypoints: web
 | 
					
						
							|  |  |  |       traefik.http.routers.monica-insecure.service: monica
 | 
					
						
							|  |  |  |       traefik.http.routers.monica-insecure.middlewares: monica-web-redirect
 | 
					
						
							|  |  |  |       # Websecure
 | 
					
						
							| 
									
										
										
										
											2023-02-04 14:16:59 +00:00
										 |  |  |       traefik.http.routers.monica.rule: Host(`${APP_DOMAIN}`)
 | 
					
						
							|  |  |  |       traefik.http.routers.monica.entrypoints: websecure
 | 
					
						
							|  |  |  |       traefik.http.routers.monica.service: monica
 | 
					
						
							|  |  |  |       traefik.http.routers.monica.tls.certresolver: myresolver
 | 
					
						
							| 
									
										
										
										
											2023-06-12 19:58:59 +00:00
										 |  |  |       # Local domain
 | 
					
						
							|  |  |  |       traefik.http.routers.monica-local-insecure.rule: Host(`monica.${LOCAL_DOMAIN}`)
 | 
					
						
							|  |  |  |       traefik.http.routers.monica-local-insecure.entrypoints: web
 | 
					
						
							|  |  |  |       traefik.http.routers.monica-local-insecure.service: monica
 | 
					
						
							|  |  |  |       traefik.http.routers.monica-local-insecure.middlewares: monica-web-redirect
 | 
					
						
							|  |  |  |       # Local domain secure
 | 
					
						
							|  |  |  |       traefik.http.routers.monica-local.rule: Host(`monica.${LOCAL_DOMAIN}`)
 | 
					
						
							|  |  |  |       traefik.http.routers.monica-local.entrypoints: websecure
 | 
					
						
							|  |  |  |       traefik.http.routers.monica-local.service: monica
 | 
					
						
							|  |  |  |       traefik.http.routers.monica-local.tls: true
 | 
					
						
							| 
									
										
										
										
											2023-02-04 14:16:59 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |   monica-db:
 | 
					
						
							| 
									
										
										
										
											2023-02-05 10:10:49 +00:00
										 |  |  |     image: mariadb:10.6.11
 | 
					
						
							|  |  |  |     container_name: monica-db
 | 
					
						
							| 
									
										
										
										
											2023-02-04 14:16:59 +00:00
										 |  |  |     environment:
 | 
					
						
							|  |  |  |       - TZ=${TZ}
 | 
					
						
							| 
									
										
										
										
											2023-02-05 10:10:49 +00:00
										 |  |  |       - MARIADB_RANDOM_ROOT_PASSWORD=true
 | 
					
						
							|  |  |  |       - MARIADB_DATABASE=monica
 | 
					
						
							|  |  |  |       - MARIADB_USER=usermonica
 | 
					
						
							|  |  |  |       - MARIADB_PASSWORD=${MONICA_DB_PASS}
 | 
					
						
							| 
									
										
										
										
											2023-02-04 14:16:59 +00:00
										 |  |  |     volumes:
 | 
					
						
							|  |  |  |       - ${APP_DATA_DIR}/mysql:/var/lib/mysql
 | 
					
						
							|  |  |  |     restart: unless-stopped
 | 
					
						
							|  |  |  |     networks:
 | 
					
						
							|  |  |  |       - tipi_main_network
 |