Created
July 29, 2023 14:18
-
-
Save altela/49460c634e020b2f2911c771901efa75 to your computer and use it in GitHub Desktop.
Odoo 16 Docker Compose
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3.3' | |
services: | |
# Web Application Service Definition | |
# -------- | |
# | |
# All of the information needed to start up an odoo web | |
# application container. | |
web: | |
image: odoo:16 | |
platform: linux/x86_64 | |
depends_on: | |
- db | |
# Port Mapping | |
# -------- | |
# | |
# Here we are mapping a port on the host machine (on the left) | |
# to a port inside of the container (on the right.) The default | |
# port on Odoo is 8069, so Odoo is running on that port inside | |
# of the container. But we are going to access it locally on | |
# our machine from localhost:9000. | |
ports: | |
- 8016:8069 | |
# Data Volumes | |
# -------- | |
# | |
# This defines files that we are mapping from the host machine | |
# into the container. | |
# | |
# Right now, we are using it to map a configuration file into | |
# the container and any extra odoo modules. | |
volumes: | |
- ./config:/etc/odoo | |
- ./addons:/mnt/extra-addons | |
# Odoo Environment Variables | |
# -------- | |
# | |
# The odoo image uses a few different environment | |
# variables when running to connect to the postgres | |
# database. | |
# | |
# Make sure that they are the same as the database user | |
# defined in the db container environment variables. | |
environment: | |
- HOST=db | |
- USER=odoo | |
- PASSWORD=odoo | |
# Database Container Service Definition | |
# -------- | |
# | |
# All of the information needed to start up a postgresql | |
# container. | |
db: | |
image: postgres:14.8 | |
platform: linux/x86_64 | |
restart: always | |
# Database Environment Variables | |
# -------- | |
# | |
# The postgresql image uses a few different environment | |
# variables when running to create the database. Set the | |
# username and password of the database user here. | |
# | |
# Make sure that they are the same as the database user | |
# defined in the web container environment variables. | |
environment: | |
- POSTGRES_PASSWORD=odoo | |
- POSTGRES_USER=odoo | |
- POSTGRES_DB=postgres # Leave this set to postgres |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment