| 
									
										
										
										
											2023-10-05 03:26:40 +00:00
										 |  |  | version: "3.8"
 | 
					
						
							|  |  |  | services:
 | 
					
						
							| 
									
										
										
										
											2023-10-05 03:52:57 +00:00
										 |  |  |   mongo:
 | 
					
						
							|  |  |  |     container_name: mongo
 | 
					
						
							| 
									
										
										
										
											2023-10-05 03:26:40 +00:00
										 |  |  |     image: mongo:7.0.2
 | 
					
						
							|  |  |  |     restart: unless-stopped
 | 
					
						
							|  |  |  |     ports:
 | 
					
						
							|  |  |  |       - ${APP_PORT}:27017
 | 
					
						
							|  |  |  |     networks:
 | 
					
						
							|  |  |  |       - tipi_main_network
 | 
					
						
							|  |  |  |     environment:
 | 
					
						
							|  |  |  |       - MONGO_INITDB_ROOT_USERNAME=${MONGO_INITDB_ROOT_USERNAME}
 | 
					
						
							|  |  |  |       - MONGO_INITDB_ROOT_PASSWORD=${MONGO_INITDB_ROOT_PASSWORD}
 | 
					
						
							|  |  |  |     labels:
 | 
					
						
							|  |  |  |       # Main
 | 
					
						
							|  |  |  |       traefik.enable: true
 | 
					
						
							| 
									
										
										
										
											2023-10-05 03:52:57 +00:00
										 |  |  |       traefik.http.middlewares.mongo-web-redirect.redirectscheme.scheme: https
 | 
					
						
							|  |  |  |       traefik.http.services.mongo.loadbalancer.server.port: 27017
 | 
					
						
							| 
									
										
										
										
											2023-10-05 03:26:40 +00:00
										 |  |  |       # Web
 | 
					
						
							| 
									
										
										
										
											2023-10-05 03:52:57 +00:00
										 |  |  |       traefik.http.routers.mongo-insecure.rule: Host(`${APP_DOMAIN}`)
 | 
					
						
							|  |  |  |       traefik.http.routers.mongo-insecure.entrypoints: web
 | 
					
						
							|  |  |  |       traefik.http.routers.mongo-insecure.service: mongo
 | 
					
						
							|  |  |  |       traefik.http.routers.mongo-insecure.middlewares: mongo-web-redirect
 | 
					
						
							| 
									
										
										
										
											2023-10-05 03:26:40 +00:00
										 |  |  |       # Websecure
 | 
					
						
							| 
									
										
										
										
											2023-10-05 03:52:57 +00:00
										 |  |  |       traefik.http.routers.mongo.rule: Host(`${APP_DOMAIN}`)
 | 
					
						
							|  |  |  |       traefik.http.routers.mongo.entrypoints: websecure
 | 
					
						
							|  |  |  |       traefik.http.routers.mongo.service: mongo
 | 
					
						
							|  |  |  |       traefik.http.routers.mongo.tls.certresolver: myresolver
 | 
					
						
							| 
									
										
										
										
											2023-10-05 03:26:40 +00:00
										 |  |  |       # Local domain
 | 
					
						
							| 
									
										
										
										
											2023-10-05 03:52:57 +00:00
										 |  |  |       traefik.http.routers.mongo-local-insecure.rule: Host(`mongo.${LOCAL_DOMAIN}`)
 | 
					
						
							|  |  |  |       traefik.http.routers.mongo-local-insecure.entrypoints: web
 | 
					
						
							|  |  |  |       traefik.http.routers.mongo-local-insecure.service: mongo
 | 
					
						
							|  |  |  |       traefik.http.routers.mongo-local-insecure.middlewares: mongo-web-redirect
 | 
					
						
							| 
									
										
										
										
											2023-10-05 03:26:40 +00:00
										 |  |  |       # Local domain secure
 | 
					
						
							| 
									
										
										
										
											2023-10-05 03:52:57 +00:00
										 |  |  |       traefik.http.routers.mongo-local.rule: Host(`mongo.${LOCAL_DOMAIN}`)
 | 
					
						
							|  |  |  |       traefik.http.routers.mongo-local.entrypoints: websecure
 | 
					
						
							|  |  |  |       traefik.http.routers.mongo-local.service: mongo
 | 
					
						
							|  |  |  |       traefik.http.routers.mongo-local.tls: true
 |