mirror of
https://github.com/odoocker/odoocker
synced 2025-11-04 23:29:19 +01:00
Compare commits
40 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bf0448db33 | ||
|
|
d0bfa83653 | ||
|
|
5eff644269 | ||
|
|
e499f951d2 | ||
|
|
e05f5333bd | ||
|
|
53f235a619 | ||
|
|
4f1132afef | ||
|
|
faa6cf6b4c | ||
|
|
0ab69e43a5 | ||
|
|
9d13ed0db1 | ||
|
|
d8f96573e3 | ||
|
|
cf6d846723 | ||
|
|
21e5c4ecde | ||
|
|
ecc5481be4 | ||
|
|
10d0388a1b | ||
|
|
2f1f6fc63b | ||
|
|
5620db94a1 | ||
|
|
08b506972a | ||
|
|
32f16fee74 | ||
|
|
7568dbc44f | ||
|
|
77edc03b91 | ||
|
|
6fd07e113a | ||
|
|
bf51474d47 | ||
|
|
137e653d7f | ||
|
|
f2be28ff3e | ||
|
|
f9a6d5c1ab | ||
|
|
d3e819b4b6 | ||
|
|
1a191383fa | ||
|
|
f29066cc16 | ||
|
|
649c51cc9c | ||
|
|
ecac58a89e | ||
|
|
c677cdd69e | ||
|
|
fa93ecd4f4 | ||
|
|
2076c8ddfa | ||
|
|
98b94b6f86 | ||
|
|
eaa7826e4b | ||
|
|
3127152a17 | ||
|
|
187f18440e | ||
|
|
1cb579cd36 | ||
|
|
e1dcc69b5b |
63
.env.example
63
.env.example
@@ -8,9 +8,10 @@ UPDATE=
|
|||||||
LOAD=base,web
|
LOAD=base,web
|
||||||
ROOT_PATH=/usr/lib/python3/dist-packages/odoo
|
ROOT_PATH=/usr/lib/python3/dist-packages/odoo
|
||||||
WORKERS=0
|
WORKERS=0
|
||||||
DEV_MODE=reload,xml
|
|
||||||
DOMAIN=erp.odoocker.test
|
DOMAIN=erp.odoocker.test
|
||||||
ADMIN_PASSWD=odoo
|
ADMIN_PASSWD=odoo
|
||||||
|
# Use reload,xml to enable hot reload in python and xml files
|
||||||
|
DEV_MODE=
|
||||||
|
|
||||||
# Services
|
# Services
|
||||||
PROJECT_NAME=odoocker
|
PROJECT_NAME=odoocker
|
||||||
@@ -21,11 +22,16 @@ USE_REDIS=false
|
|||||||
USE_S3=false
|
USE_S3=false
|
||||||
USE_SENTRY=false
|
USE_SENTRY=false
|
||||||
USE_PGADMIN=false
|
USE_PGADMIN=false
|
||||||
|
USE_PGBOUNCER=false
|
||||||
|
|
||||||
# Enterprise
|
# GitHub user and access token to clone private repositories
|
||||||
GITHUB_USER=
|
GITHUB_USER=
|
||||||
GITHUB_ACCESS_TOKEN=
|
GITHUB_ACCESS_TOKEN=
|
||||||
|
|
||||||
|
# GitHub user and access token to clone Enterprise repository
|
||||||
|
ENTERPRISE_USER=${GITHUB_USER}
|
||||||
|
ENTERPRISE_ACCESS_TOKEN=${GITHUB_ACCESS_TOKEN}
|
||||||
|
|
||||||
# Database
|
# Database
|
||||||
DB_HOST=postgres
|
DB_HOST=postgres
|
||||||
DB_PORT=5432
|
DB_PORT=5432
|
||||||
@@ -41,6 +47,11 @@ UNACCENT=False
|
|||||||
LIST_DB=True
|
LIST_DB=True
|
||||||
DBFILTER=.*
|
DBFILTER=.*
|
||||||
|
|
||||||
|
# PgBouncer
|
||||||
|
POOL_MODE=transaction
|
||||||
|
MAX_CLIENT_CONN=500
|
||||||
|
ADMIN_USERS=postgres,odoo
|
||||||
|
|
||||||
# Logging
|
# Logging
|
||||||
LOG_LEVEL=info
|
LOG_LEVEL=info
|
||||||
# Additional logs
|
# Additional logs
|
||||||
@@ -98,7 +109,7 @@ S3_VIRTUAL_HOST=s3.odoocker.test
|
|||||||
S3_API_PORT=9000
|
S3_API_PORT=9000
|
||||||
S3_CONSOLE_PORT=9001
|
S3_CONSOLE_PORT=9001
|
||||||
|
|
||||||
AWS_HOST=http://s3:${S3_API_PORT}
|
AWS_HOST=http://minio:${S3_API_PORT}
|
||||||
AWS_REGION=
|
AWS_REGION=
|
||||||
AWS_ACCESS_KEY_ID=myaccesskey
|
AWS_ACCESS_KEY_ID=myaccesskey
|
||||||
AWS_SECRET_ACCESS_KEY=mysecretkey
|
AWS_SECRET_ACCESS_KEY=mysecretkey
|
||||||
@@ -114,6 +125,7 @@ PGADMIN_DB_HOST="'postgresql://${PGADMING_DB_USER}:${PGADMIN_DB_PASSWORD}@${DB_H
|
|||||||
PGADMIN_EMAIL=pgadmin@example.com
|
PGADMIN_EMAIL=pgadmin@example.com
|
||||||
PGADMIN_PASSWORD=pgadmin
|
PGADMIN_PASSWORD=pgadmin
|
||||||
|
|
||||||
|
# To import servers use /pgadmin4/servers.json on first build, then remove.
|
||||||
PGADMIN_SERVERS_JSON=
|
PGADMIN_SERVERS_JSON=
|
||||||
PGADMIN_CONFIG_SERVER_MODE=True
|
PGADMIN_CONFIG_SERVER_MODE=True
|
||||||
|
|
||||||
@@ -129,6 +141,7 @@ USE_REDIS=${USE_REDIS}
|
|||||||
USE_S3=${USE_S3}
|
USE_S3=${USE_S3}
|
||||||
USE_SENTRY=${USE_SENTRY}
|
USE_SENTRY=${USE_SENTRY}
|
||||||
USE_PGADMIN=${USE_PGADMIN}
|
USE_PGADMIN=${USE_PGADMIN}
|
||||||
|
USE_PGBOUNCER=${USE_PGBOUNCER}
|
||||||
|
|
||||||
# Which services are going to be brought up
|
# Which services are going to be brought up
|
||||||
COMPOSE_PROFILES=${SERVICES}
|
COMPOSE_PROFILES=${SERVICES}
|
||||||
@@ -138,20 +151,24 @@ ODOO_PROFILES="odoo"
|
|||||||
POSTGRES_PROFILES="postgres"
|
POSTGRES_PROFILES="postgres"
|
||||||
NGINX_PROFILES="nginx"
|
NGINX_PROFILES="nginx"
|
||||||
NGINX_PROXY_PROFILES="proxy"
|
NGINX_PROXY_PROFILES="proxy"
|
||||||
|
TRAEFIK_PROFILES="traefik"
|
||||||
ACME_COMPANION_PROFILES="acme"
|
ACME_COMPANION_PROFILES="acme"
|
||||||
KEYDB_PROFILES="keydb"
|
KEYDB_PROFILES="keydb"
|
||||||
MINIO_PROFILES="minio"
|
MINIO_PROFILES="minio"
|
||||||
PGADMIN_PROFILES="pgadmin"
|
PGADMIN_PROFILES="pgadmin"
|
||||||
|
PGBOUNCER_PROFILES="pgbouncer"
|
||||||
|
|
||||||
# Containers' Tags
|
# Containers' Tags
|
||||||
ODOO_TAG=16.0
|
ODOO_TAG=17.0
|
||||||
POSTGRES_TAG=16.1
|
POSTGRES_TAG=16.1
|
||||||
|
PGBOUNCER_TAG=latest
|
||||||
KEYDB_TAG=latest
|
KEYDB_TAG=latest
|
||||||
MINIO_TAG=latest
|
MINIO_TAG=latest
|
||||||
NGINX_TAG=1.25.3
|
NGINX_TAG=1.25.3
|
||||||
NGINX_PROXY_TAG=1.4.0
|
NGINX_PROXY_TAG=1.4.0
|
||||||
ACME_COMPANION_TAG=2.2.9
|
TRAEFIK_TAG=2.11
|
||||||
PGADMIN_TAG=8.0
|
ACME_COMPANION_TAG=2.2.10
|
||||||
|
PGADMIN_TAG=8.2
|
||||||
|
|
||||||
# Odoocker paths
|
# Odoocker paths
|
||||||
COMMUNITY_ADDONS=${ROOT_PATH}/addons
|
COMMUNITY_ADDONS=${ROOT_PATH}/addons
|
||||||
@@ -307,6 +324,40 @@ POSTGRES_USER=${POSTGRES_MAIN_USER}
|
|||||||
POSTGRES_PASSWORD=${POSTGRES_MAIN_PASSWORD}
|
POSTGRES_PASSWORD=${POSTGRES_MAIN_PASSWORD}
|
||||||
PGDATA=/var/lib/postgresql/data/${PROJECT_NAME}
|
PGDATA=/var/lib/postgresql/data/${PROJECT_NAME}
|
||||||
|
|
||||||
|
#---------------#
|
||||||
|
# Traefik #
|
||||||
|
#---------------#
|
||||||
|
# Volumes
|
||||||
|
ACME_JSON=/acme.json
|
||||||
|
TRAEFIK_LOGS=/var/log/traefik
|
||||||
|
|
||||||
|
# Command
|
||||||
|
API_DASHBOARD=true
|
||||||
|
API_INSECURE=true
|
||||||
|
API_DEBUG=false
|
||||||
|
ENTRYPOINTS_WEB_ADDRESS=:80
|
||||||
|
ENTRYPOINTS_WEBSECURE_ADDRESS=:443
|
||||||
|
TRAEFIK_LOG_LEVEL=INFO
|
||||||
|
ACCESSLOG_FILEPATH=${TRAEFIK_LOGS}/access.log
|
||||||
|
ACME_HTTPCHALLENGE=true
|
||||||
|
ACME_HTTPCHALLENGE_ENTRYPOINT=web
|
||||||
|
ACME_EMAIL=mail@example.com
|
||||||
|
ACME_STORAGE=${ACME_JSON}
|
||||||
|
# For prod use: https://acme-v02.api.letsencrypt.org/directory
|
||||||
|
ACME_CASERVER=https://acme-staging-v02.api.letsencrypt.org/directory
|
||||||
|
INSERCURE_SKIP_VERIFY=true
|
||||||
|
|
||||||
|
# Labels
|
||||||
|
TRAEFIK_ENABLE=true
|
||||||
|
HTTP_CATCHALL_ENTRYPOINTS=web
|
||||||
|
HTTP_CATCHALL_MIDDLEWARES=redirect-to-https
|
||||||
|
MIDDLEWARES_REDIRECT_SCHEME=https
|
||||||
|
|
||||||
|
TRAEFIK_DASHBOARD_DOMAIN=traefik.odoocker.test
|
||||||
|
TRAEFIK_DASHBOARD_ENTRYPOINTS=websecure
|
||||||
|
TRAEFIK_DASHBOARD_TLS_CERTRESOLVER=leresolver
|
||||||
|
TRAEFIK_DASHBOARD_SERVICE=api@internal
|
||||||
|
|
||||||
#-------------#
|
#-------------#
|
||||||
# Nginx #
|
# Nginx #
|
||||||
#-------------#
|
#-------------#
|
||||||
|
|||||||
2
.gitignore
vendored
2
.gitignore
vendored
@@ -9,3 +9,5 @@ docker-compose.override.yml
|
|||||||
|
|
||||||
# Ignores any __pycache__ folder.
|
# Ignores any __pycache__ folder.
|
||||||
__pycache__
|
__pycache__
|
||||||
|
|
||||||
|
upgrade/
|
||||||
|
|||||||
@@ -43,6 +43,7 @@ In essence, Odoocker isn't just another tool, it's a philosophy. So, whether you
|
|||||||
1. **Clone and Configure**:
|
1. **Clone and Configure**:
|
||||||
```
|
```
|
||||||
git clone git@github.com:odoocker/odoocker.git
|
git clone git@github.com:odoocker/odoocker.git
|
||||||
|
cd odoocker
|
||||||
cp .env.example .env && cp docker-compose.override.local.yml docker-compose.override.yml
|
cp .env.example .env && cp docker-compose.override.local.yml docker-compose.override.yml
|
||||||
```
|
```
|
||||||
2. **Hosts & Domains**: To ensure everything runs smoothly, remember to add the necessary domains to your hosts file.
|
2. **Hosts & Domains**: To ensure everything runs smoothly, remember to add the necessary domains to your hosts file.
|
||||||
@@ -155,6 +156,7 @@ docker-compose down
|
|||||||
```
|
```
|
||||||
cp docker-compose.override.production.yml docker-compose.override.yml
|
cp docker-compose.override.production.yml docker-compose.override.yml
|
||||||
```
|
```
|
||||||
|
- Update .env `SERVICES` (add `acme`) and `ACME_CA_URI` (use production link).
|
||||||
- Make sure the DNS record of your `DOMAIN` is pointing to your server.
|
- Make sure the DNS record of your `DOMAIN` is pointing to your server.
|
||||||
- Rebuild the containers
|
- Rebuild the containers
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -12,6 +12,11 @@ services:
|
|||||||
ports:
|
ports:
|
||||||
- 5432:5432
|
- 5432:5432
|
||||||
|
|
||||||
|
pgbouncer:
|
||||||
|
restart: 'no'
|
||||||
|
expose:
|
||||||
|
- 5432/tcp
|
||||||
|
|
||||||
nginx:
|
nginx:
|
||||||
restart: 'no'
|
restart: 'no'
|
||||||
|
|
||||||
@@ -20,3 +25,21 @@ services:
|
|||||||
ports:
|
ports:
|
||||||
- 80:80
|
- 80:80
|
||||||
- 443:443
|
- 443:443
|
||||||
|
|
||||||
|
traefik:
|
||||||
|
restart: 'no'
|
||||||
|
ports:
|
||||||
|
- 80:80
|
||||||
|
- 443:443
|
||||||
|
|
||||||
|
acme-companion:
|
||||||
|
restart: 'no'
|
||||||
|
|
||||||
|
keydb:
|
||||||
|
restart: 'no'
|
||||||
|
|
||||||
|
minio:
|
||||||
|
restart: 'no'
|
||||||
|
|
||||||
|
pgadmin:
|
||||||
|
restart: 'no'
|
||||||
|
|||||||
@@ -12,6 +12,11 @@ services:
|
|||||||
ports:
|
ports:
|
||||||
- 127.0.0.1:5432:5432
|
- 127.0.0.1:5432:5432
|
||||||
|
|
||||||
|
pgbouncer:
|
||||||
|
restart: unless-stopped
|
||||||
|
expose:
|
||||||
|
- 5432/tcp
|
||||||
|
|
||||||
nginx:
|
nginx:
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
|
||||||
@@ -20,3 +25,33 @@ services:
|
|||||||
ports:
|
ports:
|
||||||
- 80:80
|
- 80:80
|
||||||
- 443:443
|
- 443:443
|
||||||
|
|
||||||
|
traefik:
|
||||||
|
restart: unless-stopped
|
||||||
|
ports:
|
||||||
|
- 80:80
|
||||||
|
- 443:443
|
||||||
|
command:
|
||||||
|
- --entrypoints.websecure.address=${ENTRYPOINTS_WEBSECURE_ADDRESS}
|
||||||
|
- --certificatesresolvers.leresolver.acme.httpchallenge=${ACME_HTTPCHALLENGE}
|
||||||
|
- --certificatesresolvers.leresolver.acme.httpchallenge.entrypoint=${ACME_HTTPCHALLENGE_ENTRYPOINT}
|
||||||
|
- --certificatesresolvers.leresolver.acme.email=${ACME_EMAIL}
|
||||||
|
- --certificatesresolvers.leresolver.acme.storage=${ACME_STORAGE}
|
||||||
|
- --certificatesresolvers.leresolver.acme.caserver=${ACME_CASERVER}
|
||||||
|
labels:
|
||||||
|
- traefik.http.routers.http-catchall.middlewares=${HTTP_CATCHALL_MIDDLEWARES}
|
||||||
|
- traefik.http.middlewares.redirect-to-https.redirectscheme.scheme=${MIDDLEWARES_REDIRECT_SCHEME}
|
||||||
|
- traefik.http.routers.traefik-dashboard.entrypoints=${TRAEFIK_DASHBOARD_ENTRYPOINTS}
|
||||||
|
- traefik.http.routers.traefik-dashboard.tls.certresolver=${TRAEFIK_DASHBOARD_TLS_CERTRESOLVER}
|
||||||
|
|
||||||
|
acme-companion:
|
||||||
|
restart: unless-stopped
|
||||||
|
|
||||||
|
keydb:
|
||||||
|
restart: unless-stopped
|
||||||
|
|
||||||
|
minio:
|
||||||
|
restart: unless-stopped
|
||||||
|
|
||||||
|
pgadmin:
|
||||||
|
restart: unless-stopped
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
services:
|
services:
|
||||||
odoo:
|
odoo:
|
||||||
|
container_name: odoo
|
||||||
build:
|
build:
|
||||||
context: ./
|
context: ./
|
||||||
dockerfile: ./odoo/Dockerfile
|
dockerfile: ./odoo/Dockerfile
|
||||||
@@ -7,15 +8,18 @@ services:
|
|||||||
- ODOO_TAG
|
- ODOO_TAG
|
||||||
- ODOO_RC
|
- ODOO_RC
|
||||||
- ROOT_PATH
|
- ROOT_PATH
|
||||||
|
- ENTERPRISE_USER
|
||||||
|
- ENTERPRISE_ACCESS_TOKEN
|
||||||
|
- ENTERPRISE_ADDONS
|
||||||
- GITHUB_USER
|
- GITHUB_USER
|
||||||
- GITHUB_ACCESS_TOKEN
|
- GITHUB_ACCESS_TOKEN
|
||||||
- ENTERPRISE_ADDONS
|
|
||||||
- THIRD_PARTY_ADDONS
|
- THIRD_PARTY_ADDONS
|
||||||
- LOG_PATH
|
- LOG_PATH
|
||||||
- USE_REDIS
|
- USE_REDIS
|
||||||
- USE_S3
|
- USE_S3
|
||||||
- USE_SENTRY
|
- USE_SENTRY
|
||||||
tty: true
|
tty: true
|
||||||
|
shm_size: 1gb
|
||||||
volumes:
|
volumes:
|
||||||
- odoo-data:${DATA_DIR}
|
- odoo-data:${DATA_DIR}
|
||||||
- ./odoo/extra-addons:${EXTRA_ADDONS}
|
- ./odoo/extra-addons:${EXTRA_ADDONS}
|
||||||
@@ -53,13 +57,14 @@ services:
|
|||||||
profiles: [$ODOO_PROFILES]
|
profiles: [$ODOO_PROFILES]
|
||||||
|
|
||||||
postgres:
|
postgres:
|
||||||
|
container_name: postgres
|
||||||
build:
|
build:
|
||||||
context: ./
|
context: ./
|
||||||
dockerfile: ./postgres/Dockerfile
|
dockerfile: ./postgres/Dockerfile
|
||||||
args:
|
args:
|
||||||
- POSTGRES_TAG
|
- POSTGRES_TAG
|
||||||
restart: unless-stopped
|
|
||||||
tty: true
|
tty: true
|
||||||
|
shm_size: 1gb
|
||||||
volumes:
|
volumes:
|
||||||
- pg-data:${PGDATA}
|
- pg-data:${PGDATA}
|
||||||
- ./postgres/entrypoint.sh:/docker-entrypoint-initdb.d/entrypoint.sh
|
- ./postgres/entrypoint.sh:/docker-entrypoint-initdb.d/entrypoint.sh
|
||||||
@@ -78,14 +83,30 @@ services:
|
|||||||
- internal
|
- internal
|
||||||
profiles: [$POSTGRES_PROFILES]
|
profiles: [$POSTGRES_PROFILES]
|
||||||
|
|
||||||
|
pgbouncer:
|
||||||
|
image: edoburu/pgbouncer:latest
|
||||||
|
container_name: pgbouncer
|
||||||
|
restart: always
|
||||||
|
depends_on:
|
||||||
|
- postgres
|
||||||
|
environment:
|
||||||
|
- DB_HOST=${DB_HOST}
|
||||||
|
- DB_USER=${DB_USER}
|
||||||
|
- DB_PASSWORD=${DB_PASSWORD}
|
||||||
|
- MAX_CLIENT_CONN=${MAX_CLIENT_CONN}
|
||||||
|
- POOL_MODE=${POOL_MODE}
|
||||||
|
- ADMIN_USERS=${ADMIN_USERS}
|
||||||
|
profiles: [$PGBOUNCER_PROFILES]
|
||||||
|
|
||||||
nginx:
|
nginx:
|
||||||
|
container_name: nginx
|
||||||
image: nginx:${NGINX_TAG}
|
image: nginx:${NGINX_TAG}
|
||||||
depends_on:
|
depends_on:
|
||||||
- odoo
|
- odoo
|
||||||
restart: unless-stopped
|
|
||||||
tty: true
|
tty: true
|
||||||
expose:
|
expose:
|
||||||
- 80/tcp
|
- 80/tcp
|
||||||
|
shm_size: 1gb
|
||||||
volumes:
|
volumes:
|
||||||
- ./nginx/nginx.conf:${NGINX_CONF}
|
- ./nginx/nginx.conf:${NGINX_CONF}
|
||||||
- ./nginx/default.conf:${NGINX_DEFAULT_CONF}
|
- ./nginx/default.conf:${NGINX_DEFAULT_CONF}
|
||||||
@@ -99,11 +120,12 @@ services:
|
|||||||
profiles: [$NGINX_PROFILES]
|
profiles: [$NGINX_PROFILES]
|
||||||
|
|
||||||
nginx-proxy:
|
nginx-proxy:
|
||||||
|
container_name: nginx-proxy
|
||||||
image: nginxproxy/nginx-proxy:${NGINX_PROXY_TAG}
|
image: nginxproxy/nginx-proxy:${NGINX_PROXY_TAG}
|
||||||
depends_on:
|
depends_on:
|
||||||
- nginx
|
- nginx
|
||||||
restart: unless-stopped
|
|
||||||
tty: true
|
tty: true
|
||||||
|
shm_size: 1gb
|
||||||
volumes:
|
volumes:
|
||||||
- ./nginx-proxy/nginx.conf:${NGINX_CONF}
|
- ./nginx-proxy/nginx.conf:${NGINX_CONF}
|
||||||
- ./nginx-proxy/cors.conf:${NGINX_PROXY_CORS_CONF}
|
- ./nginx-proxy/cors.conf:${NGINX_PROXY_CORS_CONF}
|
||||||
@@ -118,41 +140,41 @@ services:
|
|||||||
- internal
|
- internal
|
||||||
profiles: [$NGINX_PROXY_PROFILES]
|
profiles: [$NGINX_PROXY_PROFILES]
|
||||||
|
|
||||||
redis:
|
traefik:
|
||||||
image: eqalpha/keydb:${KEYDB_TAG}
|
container_name: traefik
|
||||||
platform: linux/amd64
|
image: "traefik:${TRAEFIK_TAG}"
|
||||||
ports:
|
|
||||||
- ${KEYDB_PORT}:${KEYDB_PORT}
|
|
||||||
restart: unless-stopped
|
|
||||||
volumes:
|
|
||||||
- redis-data:${KEYDB_DATA}
|
|
||||||
networks:
|
networks:
|
||||||
- internal
|
- internal
|
||||||
profiles: [$KEYDB_PROFILES]
|
command:
|
||||||
|
- --api.dashboard=${API_DASHBOARD}
|
||||||
s3:
|
- --api.insecure=${API_INSECURE}
|
||||||
image: minio/minio:${MINIO_TAG}
|
- --api.debug=${API_DEBUG}
|
||||||
environment:
|
- --entrypoints.web.address=${ENTRYPOINTS_WEB_ADDRESS}
|
||||||
- MINIO_ROOT_USER
|
- --providers.docker
|
||||||
- MINIO_ROOT_PASSWORD
|
- --log.level=${TRAEFIK_LOG_LEVEL}
|
||||||
- MINIO_BROWSER_REDIRECT_URL
|
- --accesslog.filepath=${ACCESSLOG_FILEPATH}
|
||||||
- VIRTUAL_HOST=${MINIO_VIRTUAL_HOST}
|
- --serversTransport.insecureSkipVerify=${INSERCURE_SKIP_VERIFY}
|
||||||
- VIRTUAL_PORT=${MINIO_CONSOLE_PORT}
|
tty: true
|
||||||
command: server ${MINIO_DATA} --console-address ":${MINIO_CONSOLE_PORT}"
|
shm_size: 1gb
|
||||||
volumes:
|
volumes:
|
||||||
- s3-data:${MINIO_DATA}
|
- ${DOCKER_SOCK}:${DOCKER_SOCK}:ro
|
||||||
ports:
|
- ./acme.json:${ACME_JSON}
|
||||||
- ${MINIO_API_PORT}:${MINIO_API_PORT}
|
- traefik_logs:${TRAEFIK_LOGS}
|
||||||
- ${MINIO_CONSOLE_PORT}:${MINIO_CONSOLE_PORT}
|
labels:
|
||||||
networks:
|
- traefik.enable=${TRAEFIK_ENABLE}
|
||||||
- internal
|
# Catch all HTTP trafic and redirect it to HTTPS
|
||||||
profiles: [$MINIO_PROFILES]
|
- traefik.http.routers.http-catchall.rule=hostregexp(`{host:.+}`)
|
||||||
|
- traefik.http.routers.http-catchall.entrypoints=${HTTP_CATCHALL_ENTRYPOINTS}
|
||||||
|
# Traefik Dashboard route
|
||||||
|
- traefik.http.routers.traefik-dashboard.rule=Host(`${TRAEFIK_DASHBOARD_DOMAIN}`)
|
||||||
|
- traefik.http.routers.traefik-dashboard.service=${TRAEFIK_DASHBOARD_SERVICE}
|
||||||
|
profiles: [$TRAEFIK_PROFILES]
|
||||||
|
|
||||||
letsencrypt:
|
acme-companion:
|
||||||
|
container_name: acme-companion
|
||||||
image: nginxproxy/acme-companion:${ACME_COMPANION_TAG}
|
image: nginxproxy/acme-companion:${ACME_COMPANION_TAG}
|
||||||
depends_on:
|
depends_on:
|
||||||
- nginx-proxy
|
- nginx-proxy
|
||||||
restart: unless-stopped
|
|
||||||
volumes_from:
|
volumes_from:
|
||||||
- nginx-proxy:rw
|
- nginx-proxy:rw
|
||||||
volumes:
|
volumes:
|
||||||
@@ -167,15 +189,50 @@ services:
|
|||||||
- internal
|
- internal
|
||||||
profiles: [$ACME_COMPANION_PROFILES]
|
profiles: [$ACME_COMPANION_PROFILES]
|
||||||
|
|
||||||
|
keydb:
|
||||||
|
container_name: keydb
|
||||||
|
image: eqalpha/keydb:${KEYDB_TAG}
|
||||||
|
platform: linux/amd64
|
||||||
|
ports:
|
||||||
|
- ${KEYDB_PORT}:${KEYDB_PORT}
|
||||||
|
volumes:
|
||||||
|
- redis-data:${KEYDB_DATA}
|
||||||
|
networks:
|
||||||
|
- internal
|
||||||
|
profiles: [$KEYDB_PROFILES]
|
||||||
|
|
||||||
|
minio:
|
||||||
|
container_name: minio
|
||||||
|
image: minio/minio:${MINIO_TAG}
|
||||||
|
environment:
|
||||||
|
- MINIO_ROOT_USER
|
||||||
|
- MINIO_ROOT_PASSWORD
|
||||||
|
- MINIO_BROWSER_REDIRECT_URL
|
||||||
|
- VIRTUAL_HOST=${MINIO_VIRTUAL_HOST}
|
||||||
|
- VIRTUAL_PORT=${MINIO_CONSOLE_PORT}
|
||||||
|
command: server ${MINIO_DATA} --console-address ":${MINIO_CONSOLE_PORT}"
|
||||||
|
shm_size: 1gb
|
||||||
|
volumes:
|
||||||
|
- s3-data:${MINIO_DATA}
|
||||||
|
ports:
|
||||||
|
- ${MINIO_API_PORT}:${MINIO_API_PORT}
|
||||||
|
- ${MINIO_CONSOLE_PORT}:${MINIO_CONSOLE_PORT}
|
||||||
|
networks:
|
||||||
|
- internal
|
||||||
|
profiles: [$MINIO_PROFILES]
|
||||||
|
|
||||||
pgadmin:
|
pgadmin:
|
||||||
|
container_name: pgadmin
|
||||||
build:
|
build:
|
||||||
context: ./
|
context: ./
|
||||||
dockerfile: ./pgadmin/Dockerfile
|
dockerfile: ./pgadmin/Dockerfile
|
||||||
args:
|
args:
|
||||||
- PGADMIN_TAG
|
- PGADMIN_TAG
|
||||||
restart: 'no'
|
depends_on:
|
||||||
|
- nginx-proxy
|
||||||
expose:
|
expose:
|
||||||
- 80
|
- 80
|
||||||
|
shm_size: 1gb
|
||||||
volumes:
|
volumes:
|
||||||
- pgadmin-data:${PGADMIN_DATA}
|
- pgadmin-data:${PGADMIN_DATA}
|
||||||
environment:
|
environment:
|
||||||
@@ -218,6 +275,7 @@ volumes:
|
|||||||
vhost:
|
vhost:
|
||||||
certs:
|
certs:
|
||||||
acme:
|
acme:
|
||||||
|
traefik_logs:
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
internal:
|
internal:
|
||||||
|
|||||||
@@ -11,9 +11,11 @@ USER root
|
|||||||
ARG ODOO_TAG
|
ARG ODOO_TAG
|
||||||
ARG ROOT_PATH
|
ARG ROOT_PATH
|
||||||
ARG LOG_PATH
|
ARG LOG_PATH
|
||||||
|
ARG ENTERPRISE_USER
|
||||||
|
ARG ENTERPRISE_ACCESS_TOKEN
|
||||||
|
ARG ENTERPRISE_ADDONS
|
||||||
ARG GITHUB_USER
|
ARG GITHUB_USER
|
||||||
ARG GITHUB_ACCESS_TOKEN
|
ARG GITHUB_ACCESS_TOKEN
|
||||||
ARG ENTERPRISE_ADDONS
|
|
||||||
ARG THIRD_PARTY_ADDONS
|
ARG THIRD_PARTY_ADDONS
|
||||||
ARG ODOO_RC
|
ARG ODOO_RC
|
||||||
ARG USE_REDIS
|
ARG USE_REDIS
|
||||||
@@ -22,80 +24,67 @@ ARG USE_SENTRY
|
|||||||
|
|
||||||
ENV ODOO_TAG=${ODOO_TAG} \
|
ENV ODOO_TAG=${ODOO_TAG} \
|
||||||
LOG_PATH=${LOG_PATH} \
|
LOG_PATH=${LOG_PATH} \
|
||||||
|
ENTERPRISE_USER=${ENTERPRISE_USER} \
|
||||||
|
ENTERPRISE_ACCESS_TOKEN=${ENTERPRISE_ACCESS_TOKEN} \
|
||||||
|
ENTERPRISE_ADDONS=${ENTERPRISE_ADDONS} \
|
||||||
GITHUB_USER=${GITHUB_USER} \
|
GITHUB_USER=${GITHUB_USER} \
|
||||||
GITHUB_ACCESS_TOKEN=${GITHUB_ACCESS_TOKEN} \
|
GITHUB_ACCESS_TOKEN=${GITHUB_ACCESS_TOKEN} \
|
||||||
ENTERPRISE_ADDONS=${ENTERPRISE_ADDONS} \
|
|
||||||
THIRD_PARTY_ADDONS=${THIRD_PARTY_ADDONS} \
|
THIRD_PARTY_ADDONS=${THIRD_PARTY_ADDONS} \
|
||||||
ODOO_RC=${ODOO_RC} \
|
ODOO_RC=${ODOO_RC} \
|
||||||
USE_REDIS=${USE_REDIS} \
|
USE_REDIS=${USE_REDIS} \
|
||||||
USE_S3=${USE_S3} \
|
USE_S3=${USE_S3} \
|
||||||
USE_SENTRY=${USE_SENTRY}
|
USE_SENTRY=${USE_SENTRY}
|
||||||
|
|
||||||
|
#---------------------#
|
||||||
|
# Logging #
|
||||||
|
#---------------------#
|
||||||
|
# Create odoo.log file
|
||||||
|
RUN touch ${LOG_PATH} && chown odoo:odoo ${LOG_PATH}
|
||||||
|
|
||||||
#------------------------#
|
#------------------------#
|
||||||
# APT Dependencies #
|
# APT Dependencies #
|
||||||
#------------------------#
|
#------------------------#
|
||||||
|
# Install Odoocker image dependencies
|
||||||
RUN apt-get update && apt-get install -y \
|
RUN apt-get update && apt-get install -y \
|
||||||
apt-utils \
|
# `zip` and `unzip` for filestore management
|
||||||
|
zip \
|
||||||
|
unzip \
|
||||||
|
# `git` required packages
|
||||||
git \
|
git \
|
||||||
git-man \
|
git-man \
|
||||||
less \
|
less \
|
||||||
libcbor0 \
|
libcbor0.8 \
|
||||||
libcurl3-gnutls \
|
libcurl3-gnutls \
|
||||||
libedit2 \
|
libedit2 \
|
||||||
liberror-perl \
|
liberror-perl \
|
||||||
|
libfido2-1 \
|
||||||
libxmuu1 \
|
libxmuu1 \
|
||||||
openssh-client \
|
openssh-client \
|
||||||
patch \
|
patch \
|
||||||
xauth \
|
xauth \
|
||||||
# Clean up the apt cache to reduce the image size
|
# Remove apt lists
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
#---------------------#
|
#---------------------#
|
||||||
# PIP Dependecies #
|
# PIP Dependecies #
|
||||||
#---------------------#
|
#---------------------#
|
||||||
# Upgrade pip
|
|
||||||
RUN pip3 install --upgrade pip
|
|
||||||
|
|
||||||
# Copy & Install PIP requirements
|
# Copy & Install PIP requirements
|
||||||
COPY --chown=odoo:odoo ./odoo/requirements.txt /tmp/requirements.txt
|
COPY --chown=odoo:odoo ./odoo/requirements.txt /tmp/requirements.txt
|
||||||
|
|
||||||
RUN python3 -m pip install -r /tmp/requirements.txt && \
|
RUN python3 -m pip install -r /tmp/requirements.txt && \
|
||||||
rm /tmp/requirements.txt
|
rm /tmp/requirements.txt
|
||||||
|
|
||||||
#-----------------------#
|
#--------------------------------------------#
|
||||||
# Odoo Enterprise #
|
# Odoo Enterprise + Third Party Addons #
|
||||||
#-----------------------#
|
#--------------------------------------------#
|
||||||
|
# Create third-party-addons directory and clone them
|
||||||
# Create Enterprise addons directory
|
COPY --chown=odoo:odoo ./odoo/clone-addons.sh /
|
||||||
RUN mkdir -p ${ENTERPRISE_ADDONS} && \
|
COPY --chown=odoo:odoo ./odoo/third-party-addons.txt /
|
||||||
chown odoo:odoo -R ${ENTERPRISE_ADDONS}
|
RUN /clone-addons.sh
|
||||||
|
|
||||||
# Clone Enterprise addons if user and token are present
|
|
||||||
RUN if [ -n "$GITHUB_USER" ] && [ -n "$GITHUB_ACCESS_TOKEN" ]; then \
|
|
||||||
git clone https://${GITHUB_USER}:${GITHUB_ACCESS_TOKEN}@github.com/odoo/enterprise.git ${ENTERPRISE_ADDONS} --depth 1 --branch ${ODOO_TAG} --single-branch --no-tags; \
|
|
||||||
fi
|
|
||||||
|
|
||||||
#-------------------------#
|
|
||||||
# Odoo Extra Addons #
|
|
||||||
#-------------------------#
|
|
||||||
|
|
||||||
RUN mkdir -p ${THIRD_PARTY_ADDONS} && chown odoo:odoo -R ${THIRD_PARTY_ADDONS}
|
|
||||||
|
|
||||||
COPY --chown=odoo:odoo ./odoo/fix-manifest.py /
|
|
||||||
COPY --chown=odoo:odoo ./odoo/third-party-addons.sh /
|
|
||||||
RUN /third-party-addons.sh && chown odoo:odoo -R ${THIRD_PARTY_ADDONS}
|
|
||||||
|
|
||||||
#---------------------#
|
|
||||||
# Logging #
|
|
||||||
#---------------------#
|
|
||||||
|
|
||||||
# Create odoo.log file
|
|
||||||
RUN touch ${LOG_PATH} && chown odoo:odoo ${LOG_PATH}
|
|
||||||
|
|
||||||
#-----------------------#
|
#-----------------------#
|
||||||
# Odoo Conf #
|
# Odoo Conf #
|
||||||
#-----------------------#
|
#-----------------------#
|
||||||
|
|
||||||
# Copy environment variables & script to generate odoo.conf
|
# Copy environment variables & script to generate odoo.conf
|
||||||
COPY --chown=odoo:odoo ./.env /
|
COPY --chown=odoo:odoo ./.env /
|
||||||
COPY --chown=odoo:odoo ./odoo/odoo.conf /
|
COPY --chown=odoo:odoo ./odoo/odoo.conf /
|
||||||
|
|||||||
91
odoo/clone-addons.sh
Executable file
91
odoo/clone-addons.sh
Executable file
@@ -0,0 +1,91 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# Function to construct the clone command
|
||||||
|
construct_clone_command() {
|
||||||
|
local repo_type=$1
|
||||||
|
local repo_url=$2
|
||||||
|
case $repo_type in
|
||||||
|
private) echo "git clone https://${GITHUB_USER}:${GITHUB_ACCESS_TOKEN}@${repo_url#https://}" ;;
|
||||||
|
enterprise) echo "git clone https://${ENTERPRISE_USER}:${ENTERPRISE_ACCESS_TOKEN}@${repo_url#https://} ${ENTERPRISE_ADDONS}" ;;
|
||||||
|
public) echo "git clone $repo_url" ;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
|
# Function to clone and copy modules based on conditions
|
||||||
|
clone_and_copy_modules() {
|
||||||
|
local repo_type=$1
|
||||||
|
local repo_url=$2
|
||||||
|
local clone_cmd=$(construct_clone_command $repo_type $repo_url)
|
||||||
|
local repo_name=$(basename -s .git "$repo_url")
|
||||||
|
|
||||||
|
shift 2
|
||||||
|
local modules_conditions=("$@")
|
||||||
|
|
||||||
|
# Clone and copy logic for enterprise repository
|
||||||
|
if [[ $repo_type == "enterprise" ]]; then
|
||||||
|
if [ -n "$GITHUB_USER" ] && [ -n "$GITHUB_ACCESS_TOKEN" ]; then
|
||||||
|
$clone_cmd --depth 1 --branch ${ODOO_TAG} --single-branch --no-tags
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
# Determine if any module has a true condition
|
||||||
|
local should_clone=false
|
||||||
|
if [[ ${#modules_conditions[@]} -eq 1 ]]; then
|
||||||
|
[[ ${modules_conditions[0]} == true ]] && should_clone=true
|
||||||
|
else
|
||||||
|
for (( i=1; i<${#modules_conditions[@]}; i+=2 )); do
|
||||||
|
if [[ ${modules_conditions[i]} == true ]]; then
|
||||||
|
should_clone=true
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Clone the repo if should_clone is true and it's not already cloned
|
||||||
|
if [[ $should_clone == true && ! -d "$repo_name" ]]; then
|
||||||
|
$clone_cmd --depth 1 --branch ${ODOO_TAG} --single-branch --no-tags
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Copy the modules if the condition is true
|
||||||
|
if [[ $should_clone == true ]]; then
|
||||||
|
for (( i=0; i<${#modules_conditions[@]}; i+=2 )); do
|
||||||
|
local module=${modules_conditions[i]}
|
||||||
|
local condition=${modules_conditions[i+1]}
|
||||||
|
if [[ $condition == true ]]; then
|
||||||
|
echo "Copying ${module} from ${repo_name} into ${THIRD_PARTY_ADDONS}"
|
||||||
|
cp -r /${repo_name}/${module} ${THIRD_PARTY_ADDONS}/${module}
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# Function to manually expand environment variables in a string
|
||||||
|
expand_env_vars() {
|
||||||
|
while IFS=' ' read -r -a words; do
|
||||||
|
for word in "${words[@]}"; do
|
||||||
|
if [[ $word == \$\{* ]]; then
|
||||||
|
# Remove the leading '${' and the trailing '}' from the word
|
||||||
|
varname=${word:2:-1}
|
||||||
|
# Check if the variable is set and not empty
|
||||||
|
if [ -n "${!varname+x}" ]; then
|
||||||
|
echo -n "${!varname} " # Substitute with its value
|
||||||
|
else
|
||||||
|
echo -n "false " # Default to false if not set
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo -n "$word "
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
echo
|
||||||
|
done <<< "$1"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Read the configuration file and process each line
|
||||||
|
while IFS= read -r line; do
|
||||||
|
mkdir -p ${ENTERPRISE_ADDONS}
|
||||||
|
mkdir -p ${THIRD_PARTY_ADDONS}
|
||||||
|
[[ -z "$line" || "$line" == \#* ]] && continue
|
||||||
|
clone_and_copy_modules $(expand_env_vars "$line")
|
||||||
|
done < "third-party-addons.txt"
|
||||||
@@ -71,14 +71,14 @@ case "$1" in
|
|||||||
# Automagically upgrade all addons and install new ones. Ideal for deployment process.
|
# Automagically upgrade all addons and install new ones. Ideal for deployment process.
|
||||||
echo odoo --config ${ODOO_RC} --database=${DB_NAME} --init=${INIT} --update=all --load=${LOAD} --log-level=${LOG_LEVEL} --load-language=${LOAD_LANGUAGE} --limit-time-cpu=3600 --limit-time-real=7200 --dev=
|
echo odoo --config ${ODOO_RC} --database=${DB_NAME} --init=${INIT} --update=all --load=${LOAD} --log-level=${LOG_LEVEL} --load-language=${LOAD_LANGUAGE} --limit-time-cpu=3600 --limit-time-real=7200 --dev=
|
||||||
|
|
||||||
exec odoo --config ${ODOO_RC} --update=all --without-demo=all --workers=0 --limit-time-cpu=3600 --limit-time-real=7200 --dev=
|
exec odoo --config ${ODOO_RC} --database=${DB_NAME} --init=${INIT} --update=all --without-demo=all --workers=0 --limit-time-cpu=3600 --limit-time-real=7200 --dev=
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ${APP_ENV} = 'production' ] ; then
|
if [ ${APP_ENV} = 'production' ] ; then
|
||||||
# Bring up Odoo ready for production.
|
# Bring up Odoo ready for production.
|
||||||
echo odoo --config ${ODOO_RC} --database=${DB_NAME} --init=${INIT} --update=${UPDATE} --load=${LOAD} --workers=${WORKERS} --log-level=${LOG_LEVEL} --without-demo=${WITHOUT_DEMO} --load-language= --dev=
|
echo odoo --config ${ODOO_RC} --database= --init=${INIT} --update=${UPDATE} --load=${LOAD} --workers=${WORKERS} --log-level=${LOG_LEVEL} --without-demo=${WITHOUT_DEMO} --load-language= --dev=
|
||||||
|
|
||||||
exec odoo --config ${ODOO_RC} --init=${INIT} --update=${UPDATE} --load-language= --dev=
|
exec odoo --config ${ODOO_RC} --database= --init=${INIT} --update=${UPDATE} --load-language= --dev=
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
|||||||
2
odoo/extra-addons/DELETE_ME.txt
Normal file
2
odoo/extra-addons/DELETE_ME.txt
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
Delete me once you add your first extra addon :)
|
||||||
|
This folder is made for addons that are not clonable via GitHub.
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
{
|
|
||||||
'name': 'Odoocker Base',
|
|
||||||
'summary': 'Supercharge Odoo with Odoocker',
|
|
||||||
'description': '''
|
|
||||||
Some Odoocker dependencies require to some custom values that we cover with this Addon for you.
|
|
||||||
''',
|
|
||||||
'version': '1.0.0',
|
|
||||||
'category': 'Technical',
|
|
||||||
'license': 'LGPL-3',
|
|
||||||
'author': 'Odoocker',
|
|
||||||
'maintainer': 'Odoocker',
|
|
||||||
'contributors': [
|
|
||||||
'Yhael S <yhaelopez@gmail.com>'
|
|
||||||
],
|
|
||||||
'depends': [
|
|
||||||
'base'
|
|
||||||
],
|
|
||||||
'data': [
|
|
||||||
'data/ir_config_parameter.xml'
|
|
||||||
],
|
|
||||||
'application': False,
|
|
||||||
'installable': True,
|
|
||||||
'auto_install': True
|
|
||||||
}
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<odoo>
|
|
||||||
<!-- When initializing Odoo through Docker this parameter is missing. -->
|
|
||||||
<record id="report_url" model="ir.config_parameter">
|
|
||||||
<field name="key">report.url</field>
|
|
||||||
<field name="value">http://127.0.0.1:8069</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
<!-- When initializing Odoo with S3 storage. -->
|
|
||||||
<record id="ir_attachment_location" model="ir.config_parameter">
|
|
||||||
<field name="key">ir_attachment.location</field>
|
|
||||||
<field name="value">s3</field>
|
|
||||||
</record>
|
|
||||||
</odoo>
|
|
||||||
@@ -1,34 +0,0 @@
|
|||||||
import sys
|
|
||||||
|
|
||||||
# Define the path to the manifest file
|
|
||||||
manifest_file_path = sys.argv[1]
|
|
||||||
|
|
||||||
# Read the file content
|
|
||||||
with open(manifest_file_path, 'r') as file:
|
|
||||||
lines = file.readlines()
|
|
||||||
|
|
||||||
# Find the start and end index of the manifest dictionary
|
|
||||||
start_index = next(i for i, line in enumerate(lines) if line.strip().startswith('{'))
|
|
||||||
end_index = next(i for i, line in enumerate(lines) if line.strip().endswith('}'))
|
|
||||||
|
|
||||||
# Construct and evaluate the manifest dictionary
|
|
||||||
manifest_dict = eval(''.join(lines[start_index:end_index + 1]))
|
|
||||||
|
|
||||||
# Modify the manifest dictionary
|
|
||||||
manifest_dict['installable'] = True
|
|
||||||
manifest_dict['auto_install'] = True
|
|
||||||
|
|
||||||
# Construct the modified manifest string
|
|
||||||
modified_manifest_lines = ['{\n']
|
|
||||||
for key, value in manifest_dict.items():
|
|
||||||
modified_manifest_lines.append(f" '{key}': {repr(value)},\n")
|
|
||||||
modified_manifest_lines.append('}\n')
|
|
||||||
|
|
||||||
# Replace the manifest dictionary string in the content
|
|
||||||
lines[start_index:end_index + 1] = modified_manifest_lines
|
|
||||||
|
|
||||||
# Write the modified content back to the file
|
|
||||||
with open(manifest_file_path, 'w') as file:
|
|
||||||
file.writelines(lines)
|
|
||||||
|
|
||||||
print(f"Modified {manifest_file_path}")
|
|
||||||
@@ -64,7 +64,7 @@ xmlrpcs_interface = ${XMLRPCS_INTERFACE}
|
|||||||
; --xmlrpcs-port
|
; --xmlrpcs-port
|
||||||
xmlrpcs_port = ${XMLRPCS_PORT}
|
xmlrpcs_port = ${XMLRPCS_PORT}
|
||||||
|
|
||||||
; --gevent-port | --longpolling-port (deprecated)
|
; --gevent-port
|
||||||
gevent_port = ${GEVENT_PORT}
|
gevent_port = ${GEVENT_PORT}
|
||||||
|
|
||||||
; --no-http | --no-xmlrpc
|
; --no-http | --no-xmlrpc
|
||||||
@@ -226,7 +226,7 @@ stop_after_init = ${STOP_AFTER_INIT}
|
|||||||
; --osv-memory-count-limit
|
; --osv-memory-count-limit
|
||||||
osv_memory_count_limit = ${OSV_MEMORY_COUNT_LIMIT}
|
osv_memory_count_limit = ${OSV_MEMORY_COUNT_LIMIT}
|
||||||
|
|
||||||
; --transient-age-limit | --osv-memory-age-limit (deprecated)
|
; --transient-age-limit
|
||||||
transient_age_limit = ${TRANSIENT_AGE_LIMIT}
|
transient_age_limit = ${TRANSIENT_AGE_LIMIT}
|
||||||
|
|
||||||
; --max-cron-threads
|
; --max-cron-threads
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
debugpy
|
debugpy==1.8.0
|
||||||
websocket-client
|
websocket-client==1.7.0
|
||||||
redis
|
redis==5.0.1
|
||||||
boto3
|
boto3==1.34.23
|
||||||
sentry-sdk
|
sentry-sdk==1.9.0 # Fixed because Odoo depends on urllib3==1.26.5
|
||||||
|
|||||||
@@ -1,24 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
# Check if the repository directory exists and either Redis or S3 is to be used
|
|
||||||
if [[ ${USE_REDIS} == "true" || ${USE_S3} == "true" ]]; then
|
|
||||||
git clone https://github.com/odoocker/odoo-cloud-platform.git --depth 1 --branch ${ODOO_TAG} --single-branch --no-tags;
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ ${USE_REDIS} == "true" ]]; then
|
|
||||||
cp -r odoo-cloud-platform/session_redis ${THIRD_PARTY_ADDONS}/session_redis
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Check the USE_S3 variable to decide whether to copy S3 directories
|
|
||||||
if [[ ${USE_S3} == "true" ]]; then
|
|
||||||
cp -r odoo-cloud-platform/base_attachment_object_storage ${THIRD_PARTY_ADDONS}/base_attachment_object_storage
|
|
||||||
cp -r odoo-cloud-platform/attachment_s3 ${THIRD_PARTY_ADDONS}/attachment_s3
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Check if the repository directory exists and Sentry is to be used
|
|
||||||
if [[ ${USE_SENTRY} == "true" ]]; then
|
|
||||||
git clone https://github.com/odoocker/server-tools.git --depth 1 --branch ${ODOO_TAG} --single-branch --no-tags;
|
|
||||||
cp -r server-tools/sentry ${THIRD_PARTY_ADDONS}/sentry
|
|
||||||
fi
|
|
||||||
18
odoo/third-party-addons.txt
Normal file
18
odoo/third-party-addons.txt
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
# This file is read by clone-addons.sh
|
||||||
|
|
||||||
|
# Enterprise addons
|
||||||
|
enterprise https://github.com/odoo/enterprise true
|
||||||
|
|
||||||
|
# Odoocker repositories
|
||||||
|
public https://github.com/odoocker/odoocker-modules.git odoocker_base true
|
||||||
|
public https://github.com/odoocker/odoo-cloud-platform.git session_redis ${USE_REDIS} base_attachment_object_storage ${USE_S3} attachment_s3 ${USE_S3}
|
||||||
|
public https://github.com/odoocker/server-tools.git sentry ${USE_SENTRY}
|
||||||
|
|
||||||
|
# Add repositories with the following format:
|
||||||
|
# <public|private> <repo_url> <true|false>
|
||||||
|
# or
|
||||||
|
# <public|private> <repo_url> <module1> <true|false> <module2> <true|false> ...
|
||||||
|
|
||||||
|
# Public repositories
|
||||||
|
|
||||||
|
# Private repositories
|
||||||
20
pgbouncer/docker-entrypoint-initdb.d/init.sh
Normal file
20
pgbouncer/docker-entrypoint-initdb.d/init.sh
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
|
|
||||||
|
psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-EOSQL
|
||||||
|
CREATE USER dbuser WITH ENCRYPTED PASSWORD 'dbuser';
|
||||||
|
CREATE DATABASE dbuser OWNER dbuser;
|
||||||
|
|
||||||
|
CREATE USER user1 WITH ENCRYPTED PASSWORD 'user1';
|
||||||
|
CREATE DATABASE user1 OWNER user1;
|
||||||
|
|
||||||
|
CREATE USER user2 WITH ENCRYPTED PASSWORD 'user2';
|
||||||
|
CREATE DATABASE user2 OWNER user2;
|
||||||
|
|
||||||
|
CREATE USER user3 WITH ENCRYPTED PASSWORD 'user3';
|
||||||
|
CREATE DATABASE user3 OWNER user3;
|
||||||
|
|
||||||
|
CREATE USER odoo WITH ENCRYPTED PASSWORD 'odoo';
|
||||||
|
CREATE DATABASE odoo OWNER odoo;
|
||||||
|
|
||||||
|
EOSQL
|
||||||
0
traefik/acme.json
Normal file
0
traefik/acme.json
Normal file
Reference in New Issue
Block a user