I am struggling for How I Can Setup multiple Odoo versions ( NOT multiple instances for a single version ) using Docker Containers for development on Linux Ubuntu, I want step by step all pre and post installation setups, requirements, because I do not aware for this setup yet.
Many have just guides to create and execute docker_compose.yml file for only Single version but I am stuck for further steps like required packages & libraries like Wkhtmltopdf etc., requirements.txt, python env, odoo.conf, custom addons etc. etc. all necessary things for multiple versions of Odoo docker containers I want to install and configure. Setup of Visual Studio Code for these multiple versions for development environments because Pycharm Community not allowing to configure multiple versions which installed within Docker Containers.
Please its a humble request for a beginner friendly guidance and help.
regards
I can give you this example, if this can help you : .docker-compose :
version: "3"
services:
odoo:
image: odoo:14.0
depends_on:
- db
restart: always
networks:
- internal
environment:
- HOST=db
- USER=${ODOO_USER}
- PASSWORD=${ODOO_PASS}
volumes:
- ./odoo/odoo-web-data:/var/lib/odoo
- ./odoo/config:/etc/odoo
- ./odoo/addons:/mnt/extra-addons
- ./odoo/logs:/var/log/odoo
labels:
- 'traefik.http.routers.odoo.rule=Host(`${ODOO_TRAEFIK_URL}`)'
- 'traefik.http.routers.odoo.entrypoints=websecure'
- 'traefik.http.routers.odoo.service=odoo'
- 'traefik.http.routers.odoo.tls.certresolver=odoo'
- "traefik.http.services.odoo.loadbalancer.server.port=8069"
- "traefik.http.routers.http-catchall.rule=hostregexp(`{host:.+}`)"
- "traefik.http.routers.http-catchall.entrypoints=web"
- "traefik.http.routers.http-catchall.middlewares=redirect-to-https@docker"
- "traefik.http.middlewares.redirect-to-https.redirectscheme.scheme=https"
- "traefik.http.routers.odoo-im-https.rule=Host(`${ODOO_TRAEFIK_URL}`) && (PathPrefix(`/longpolling`))"
- "traefik.http.routers.odoo-im-https.entrypoints=websecure"
- "traefik.http.routers.odoo-im-https.service=odoo-im-https"
- "traefik.http.routers.odoo-im-https.tls.certresolver=odoo"
- "traefik.http.routers.odoo-im-https.middlewares=gzip"
- "traefik.http.services.odoo-im-https.loadbalancer.server.port=8072"
- "traefik.http.middlewares.gzip.compress=true"
db:
image: postgres:13
restart: always
networks:
- internal
environment:
- POSTGRES_DB=postgres
- POSTGRES_USER=${ODOO_USER}
- POSTGRES_PASSWORD=${ODOO_PASS}
- PGDATA=/var/lib/postgresql/data/pgdata
volumes:
- ./pgdata:/var/lib/postgresql/data/pgdata
traefik:
image: traefik:v2.5
restart: always
networks:
- internal
- web
ports:
# The HTTP port
- "80:80"
- "443:443"
# The Web UI (enabled by --api.insecure=true)
- "127.0.0.1:8080:8080"
volumes:
- "./traefik/letsencrypt:/letsencrypt"
- "./traefik/traefik.yml:/etc/traefik.yml"
- "/var/run/docker.sock:/var/run/docker.sock"
command:
- "--log.level=DEBUG"
- "--api.insecure=true"
- "--providers.docker"
- "--providers.docker.defaultRule=Host(`{{ trimPrefix `/` .Name }}.${TRAEFIK_DEFAULT_DOMAIN}`)"
- "--entryPoints.web.address=:80"
- "--entryPoints.websecure.address=:443"
- "--certificatesResolvers.odoo.acme.httpchallenge=true"
- "--certificatesresolvers.odoo.acme.httpchallenge.entrypoint=web"
- "--certificatesresolvers.odoo.acme.email=${ACME_EMAIL}"
- "--certificatesresolvers.odoo.acme.storage=/letsencrypt/acme.json"
pgadmin:
image: dpage/pgadmin4:6.7
depends_on:
- db
environment:
PGADMIN_DEFAULT_EMAIL: "invitation@example.fr"
PGADMIN_DEFAULT_PASSWORD: "V8hwBZjqsleof45dhcndamcpsaHX4zU57"
ports:
- "5054:80"
- "5055:443"
networks:
- internal
- web
restart: unless-stopped
networks:
internal:
web:
external: true
.env :
ODOO_USER=odoo
ODOO_PASS=G0x+MD8j_rp::YOk
ODOO_TRAEFIK_URL=crm.example.fr
TRAEFIK_DEFAULT_DOMAIN=example.fr
ACME_EMAIL=support@example.fr
.odoo.conf :
[options]
addons_path = /mnt/extra-addons
csv_internal_sep = ,
data_dir = /var/lib/odoo
db_host = db
db_maxconn = 64
db_name = False
db_password = G0x+MD8j_rp::YOk
db_port = 5432
db_sslmode = prefer
db_template = template0
db_user = odoo
dbfilter =
demo = {}
email_from = False
geoip_database = /usr/share/GeoIP/GeoLite2-City.mmdb
http_enable = True
http_interface =
http_port = 8069
import_partial =
limit_memory_hard = 2684354560
limit_memory_soft = 2147483648
limit_request = 8192
limit_time_cpu = 3600
limit_time_real = 3600
limit_time_real_cron = -1
list_db = True
log_db = False
log_db_level = warning
log_handler = :INFO
log_level = debug
logfile = /var/log/odoo/odoo.log
logrotate = True
longpolling_port = 8072
max_cron_threads = 2
osv_memory_age_limit = 1.0
osv_memory_count_limit = False
pg_path = None
pidfile = None
proxy_mode = 1
reportgz = False
server_wide_modules = base,web
smtp_password = False
smtp_port = 25
smtp_server = localhost
smtp_ssl = False
smtp_user = False
syslog = False
test_enable = False
test_file = False
test_tags = None
translate_modules = ['all']
unaccent = False
without_demo = False
workers = 2```
You have also this example : https://www.cybrosys.com/blog/configuring-odoo-with-visual-studio-code
Perhaps, it's more than you want.