| 
									
										
										
										
											2023-12-05 19:48:41 +00:00
										 |  |  | version: "3.9"
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | services:
 | 
					
						
							|  |  |  |   odoodb:
 | 
					
						
							|  |  |  |     container_name: odoodb
 | 
					
						
							|  |  |  |     image: postgres:15
 | 
					
						
							|  |  |  |     user: root
 | 
					
						
							|  |  |  |     environment:
 | 
					
						
							|  |  |  |       - POSTGRES_USER=odoo
 | 
					
						
							| 
									
										
										
										
											2023-12-07 16:53:42 +00:00
										 |  |  |       - POSTGRES_PASSWORD=${ODOO_POSTGRES_PASSWORD}
 | 
					
						
							| 
									
										
										
										
											2023-12-05 19:48:41 +00:00
										 |  |  |       - POSTGRES_DB=postgres
 | 
					
						
							|  |  |  |     restart: unless-stopped
 | 
					
						
							|  |  |  |     volumes:
 | 
					
						
							| 
									
										
										
										
											2023-12-07 16:53:42 +00:00
										 |  |  |         - ${APP_DATA_DIR}/data/postgresql:/var/lib/postgresql/data
 | 
					
						
							| 
									
										
										
										
											2023-12-05 19:48:41 +00:00
										 |  |  |     networks:
 | 
					
						
							|  |  |  |       - tipi_main_network
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   odoo:
 | 
					
						
							|  |  |  |     container_name: odoo
 | 
					
						
							|  |  |  |     image: odoo:17
 | 
					
						
							|  |  |  |     user: root
 | 
					
						
							|  |  |  |     depends_on:
 | 
					
						
							|  |  |  |       - odoodb
 | 
					
						
							|  |  |  |     ports:
 | 
					
						
							|  |  |  |       - ${APP_PORT}:8069
 | 
					
						
							|  |  |  |     tty: true
 | 
					
						
							|  |  |  |     command: --
 | 
					
						
							|  |  |  |     environment:
 | 
					
						
							|  |  |  |       - HOST=odoodb
 | 
					
						
							|  |  |  |       - USER=odoo
 | 
					
						
							| 
									
										
										
										
											2023-12-07 16:53:42 +00:00
										 |  |  |       - PASSWORD=${ODOO_POSTGRES_PASSWORD}
 | 
					
						
							| 
									
										
										
										
											2023-12-05 19:48:41 +00:00
										 |  |  |     volumes:
 | 
					
						
							|  |  |  |       # - ./entrypoint.sh:/entrypoint.sh   # if you want to install additional Python packages, uncomment this line!
 | 
					
						
							| 
									
										
										
										
											2023-12-07 16:53:42 +00:00
										 |  |  |       - ${APP_DATA_DIR}/data/addons:/mnt/extra-addons
 | 
					
						
							|  |  |  |       - ${APP_DATA_DIR}/data/etc:/etc/odoo
 | 
					
						
							| 
									
										
										
										
											2023-12-05 19:48:41 +00:00
										 |  |  |     restart: unless-stopped
 | 
					
						
							|  |  |  |     networks:
 | 
					
						
							|  |  |  |       - tipi_main_network
 | 
					
						
							|  |  |  |     labels:
 | 
					
						
							|  |  |  |       # Main
 | 
					
						
							|  |  |  |       traefik.enable: true
 | 
					
						
							|  |  |  |       traefik.http.middlewares.odoo-web-redirect.redirectscheme.scheme: https
 | 
					
						
							|  |  |  |       traefik.http.services.odoo.loadbalancer.server.port: 8017
 | 
					
						
							|  |  |  |       # Web
 | 
					
						
							|  |  |  |       traefik.http.routers.odoo-insecure.rule: Host(`${APP_DOMAIN}`)
 | 
					
						
							|  |  |  |       traefik.http.routers.odoo-insecure.entrypoints: web
 | 
					
						
							|  |  |  |       traefik.http.routers.odoo-insecure.service: odoo
 | 
					
						
							|  |  |  |       traefik.http.routers.odoo-insecure.middlewares: odoo-web-redirect
 | 
					
						
							|  |  |  |       # Websecure
 | 
					
						
							|  |  |  |       traefik.http.routers.odoo.rule: Host(`${APP_DOMAIN}`)
 | 
					
						
							|  |  |  |       traefik.http.routers.odoo.entrypoints: websecure
 | 
					
						
							|  |  |  |       traefik.http.routers.odoo.service: odoo
 | 
					
						
							|  |  |  |       traefik.http.routers.odoo.tls.certresolver: myresolver
 | 
					
						
							|  |  |  |       # Local domain
 | 
					
						
							|  |  |  |       traefik.http.routers.odoo-local-insecure.rule: Host(`odoo.${LOCAL_DOMAIN}`)
 | 
					
						
							|  |  |  |       traefik.http.routers.odoo-local-insecure.entrypoints: web
 | 
					
						
							|  |  |  |       traefik.http.routers.odoo-local-insecure.service: odoo
 | 
					
						
							|  |  |  |       traefik.http.routers.odoo-local-insecure.middlewares: odoo-web-redirect
 | 
					
						
							|  |  |  |       # Local domain secure
 | 
					
						
							|  |  |  |       traefik.http.routers.odoo-local.rule: Host(`odoo.${LOCAL_DOMAIN}`)
 | 
					
						
							|  |  |  |       traefik.http.routers.odoo-local.entrypoints: websecure
 | 
					
						
							|  |  |  |       traefik.http.routers.odoo-local.service: odoo
 | 
					
						
							|  |  |  |       traefik.http.routers.odoo-local.tls: true
 |