mirror of
https://github.com/odoocker/odoocker
synced 2025-11-04 15:19:22 +01:00
Merge pull request #8 from odoocker/feature/enable-or-disable-features
Yhael | Feature | Enable or disable features
This commit is contained in:
37
.env.example
37
.env.example
@@ -5,12 +5,16 @@
|
|||||||
APP_ENV=local
|
APP_ENV=local
|
||||||
INIT=
|
INIT=
|
||||||
UPDATE=
|
UPDATE=
|
||||||
LOAD=base,web,session_redis,attachment_s3,sentry
|
LOAD=base,web
|
||||||
ROOT_PATH=/usr/lib/python3/dist-packages/odoo
|
ROOT_PATH=/usr/lib/python3/dist-packages/odoo
|
||||||
WORKERS=2
|
WORKERS=2
|
||||||
DEV_MODE=reload,xml
|
DEV_MODE=reload,xml
|
||||||
DOMAIN=erp.odoocker.test
|
DOMAIN=erp.odoocker.test
|
||||||
|
|
||||||
|
# Services
|
||||||
|
SERVICES=odoo,nginx,proxy,postgres
|
||||||
|
PROJECT_NAME=odoocker
|
||||||
|
|
||||||
# Enterprise
|
# Enterprise
|
||||||
GITHUB_USER=
|
GITHUB_USER=
|
||||||
GITHUB_ACCESS_TOKEN=
|
GITHUB_ACCESS_TOKEN=
|
||||||
@@ -19,7 +23,7 @@ GITHUB_ACCESS_TOKEN=
|
|||||||
ADMIN_PASSWD=odoo
|
ADMIN_PASSWD=odoo
|
||||||
DB_HOST=postgres
|
DB_HOST=postgres
|
||||||
DB_PORT=5432
|
DB_PORT=5432
|
||||||
DB_NAME=odoocker
|
DB_NAME=
|
||||||
DB_USER=odoo
|
DB_USER=odoo
|
||||||
DB_PASSWORD=odoo
|
DB_PASSWORD=odoo
|
||||||
LOAD_LANGUAGE=
|
LOAD_LANGUAGE=
|
||||||
@@ -36,7 +40,7 @@ LOG_LEVEL=info
|
|||||||
# Additional logs
|
# Additional logs
|
||||||
LOG_HANDLER_LEVEL=INFO
|
LOG_HANDLER_LEVEL=INFO
|
||||||
# Sentry
|
# Sentry
|
||||||
SENTRY_DSN=https://84799fb74edc4053aa3368aec3c2cb89@o4504596558577664.ingest.sentry.io/4504596563230720
|
SENTRY_DSN=
|
||||||
SENTRY_ENABLED=true
|
SENTRY_ENABLED=true
|
||||||
SENTRY_LOGGING_LEVEL=warn
|
SENTRY_LOGGING_LEVEL=warn
|
||||||
SENTRY_EXCLUDE_LOGGERS=
|
SENTRY_EXCLUDE_LOGGERS=
|
||||||
@@ -92,7 +96,7 @@ AWS_HOST=http://s3:${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
|
||||||
AWS_BUCKETNAME=odoocker
|
AWS_BUCKETNAME=${PROJECT_NAME}-{db}
|
||||||
|
|
||||||
# PgAdmin
|
# PgAdmin
|
||||||
PGADMIN_DOMAIN=pgadmin.odoocker.test
|
PGADMIN_DOMAIN=pgadmin.odoocker.test
|
||||||
@@ -111,9 +115,27 @@ PGADMIN_CONFIG_SERVER_MODE=True
|
|||||||
# Project Configurations #
|
# Project Configurations #
|
||||||
#------------------------------#
|
#------------------------------#
|
||||||
# Docker
|
# Docker
|
||||||
PROJECT_NAME=odoocker
|
PROJECT_NAME=${PROJECT_NAME}
|
||||||
SUPPORT_EMAIL=mail@example.com
|
SUPPORT_EMAIL=mail@example.com
|
||||||
|
|
||||||
|
# Service configuration
|
||||||
|
USE_REDIS=true
|
||||||
|
USE_S3=true
|
||||||
|
USE_SENTRY=false
|
||||||
|
|
||||||
|
# Which services are going to be brought up
|
||||||
|
COMPOSE_PROFILES=${SERVICES}
|
||||||
|
|
||||||
|
# Service profiles
|
||||||
|
ODOO_PROFILES="odoo"
|
||||||
|
POSTGRES_PROFILES="postgres"
|
||||||
|
NGINX_PROFILES="nginx"
|
||||||
|
NGINX_PROXY_PROFILES="proxy"
|
||||||
|
ACME_COMPANION_PROFILES="acme"
|
||||||
|
KEYDB_PROFILES="keydb"
|
||||||
|
MINIO_PROFILES="minio"
|
||||||
|
PGADMIN_PROFILES="pgadmin"
|
||||||
|
|
||||||
# Containers' Tags
|
# Containers' Tags
|
||||||
ODOO_TAG=16.0
|
ODOO_TAG=16.0
|
||||||
POSTGRES_TAG=16.0
|
POSTGRES_TAG=16.0
|
||||||
@@ -124,7 +146,7 @@ NGINX_PROXY_TAG=1.3.1
|
|||||||
ACME_COMPANION_TAG=2.2.8
|
ACME_COMPANION_TAG=2.2.8
|
||||||
PGADMIN_TAG=7.6
|
PGADMIN_TAG=7.6
|
||||||
|
|
||||||
# Custom paths
|
# Odoocker paths
|
||||||
COMMUNITY_ADDONS=${ROOT_PATH}/addons
|
COMMUNITY_ADDONS=${ROOT_PATH}/addons
|
||||||
ENTERPRISE_ADDONS=${ROOT_PATH}/enterprise
|
ENTERPRISE_ADDONS=${ROOT_PATH}/enterprise
|
||||||
THIRD_PARTY_ADDONS=${ROOT_PATH}/third-party-addons
|
THIRD_PARTY_ADDONS=${ROOT_PATH}/third-party-addons
|
||||||
@@ -302,6 +324,9 @@ CORS_ALLOWED_DOMAIN=${CORS_ALLOWED_DOMAIN}
|
|||||||
#----------------------#
|
#----------------------#
|
||||||
# ACME Companion #
|
# ACME Companion #
|
||||||
#----------------------#
|
#----------------------#
|
||||||
|
# For prod use: https://acme-v02.api.letsencrypt.org/directory
|
||||||
|
ACME_CA_URI=https://acme-staging-v02.api.letsencrypt.org/directory
|
||||||
|
CERTS_UPDATE_INTERVAL=3600
|
||||||
DEFAULT_EMAIL=${SUPPORT_EMAIL}
|
DEFAULT_EMAIL=${SUPPORT_EMAIL}
|
||||||
|
|
||||||
#-------------#
|
#-------------#
|
||||||
|
|||||||
@@ -19,3 +19,4 @@ services:
|
|||||||
restart: 'no'
|
restart: 'no'
|
||||||
ports:
|
ports:
|
||||||
- 80:80
|
- 80:80
|
||||||
|
- 443:443
|
||||||
|
|||||||
@@ -1,38 +1,22 @@
|
|||||||
services:
|
services:
|
||||||
odoo:
|
odoo:
|
||||||
restart: unless-stopped
|
restart: 'no'
|
||||||
ports:
|
ports:
|
||||||
- 127.0.0.1:8069:8069
|
- 127.0.0.1:8069:8069
|
||||||
|
- 127.0.0.1:8070:8070
|
||||||
- 127.0.0.1:8071:8071
|
- 127.0.0.1:8071:8071
|
||||||
- 127.0.0.1:8072:8072
|
- 127.0.0.1:8072:8072
|
||||||
|
|
||||||
postgres:
|
postgres:
|
||||||
restart: unless-stopped
|
restart: 'no'
|
||||||
ports:
|
ports:
|
||||||
- 127.0.0.1:5432:5432
|
- 127.0.0.1:5432:5432
|
||||||
|
|
||||||
|
nginx:
|
||||||
|
restart: 'no'
|
||||||
|
|
||||||
nginx-proxy:
|
nginx-proxy:
|
||||||
restart: unless-stopped
|
restart: 'no'
|
||||||
ports:
|
ports:
|
||||||
- 80:80
|
- 80:80
|
||||||
- 443:443
|
- 443:443
|
||||||
|
|
||||||
letsencrypt:
|
|
||||||
image: nginxproxy/acme-companion:${ACME_COMPANION_TAG}
|
|
||||||
depends_on:
|
|
||||||
- nginx-proxy
|
|
||||||
restart: unless-stopped
|
|
||||||
volumes_from:
|
|
||||||
- nginx-proxy:rw
|
|
||||||
volumes:
|
|
||||||
- certs:${NGINX_CERTS}:rw
|
|
||||||
- acme:${NGINX_ACME}
|
|
||||||
- ${DOCKER_SOCK}:${DOCKER_SOCK}:ro
|
|
||||||
environment:
|
|
||||||
- DEFAULT_EMAIL
|
|
||||||
networks:
|
|
||||||
- internal
|
|
||||||
|
|
||||||
volumes:
|
|
||||||
acme:
|
|
||||||
certs:
|
|
||||||
|
|||||||
@@ -1,45 +0,0 @@
|
|||||||
services:
|
|
||||||
pgadmin:
|
|
||||||
build:
|
|
||||||
context: ./
|
|
||||||
dockerfile: ./pgadmin/Dockerfile
|
|
||||||
args:
|
|
||||||
- PGADMIN_TAG
|
|
||||||
depends_on:
|
|
||||||
- postgres
|
|
||||||
restart: 'no'
|
|
||||||
expose:
|
|
||||||
- 80
|
|
||||||
volumes:
|
|
||||||
- pgadmin-data:${PGADMIN_DATA}
|
|
||||||
environment:
|
|
||||||
- PGADMIN_DEFAULT_EMAIL
|
|
||||||
- PGADMIN_DEFAULT_PASSWORD
|
|
||||||
- VIRTUAL_HOST=${PGADMIN_VIRTUAL_HOST}
|
|
||||||
- LETSENCRYPT_HOST=${PGADMIN_LETSENCRYPT_HOST}
|
|
||||||
- LETSENCRYPT_EMAIL=${PGADMIN_LETSENCRYPT_EMAIL}
|
|
||||||
- PGADMIN_CONFIG_APP_NAME
|
|
||||||
- PGADMIN_CONFIG_CONFIG_DATABASE_CONNECTION_POOL_SIZE
|
|
||||||
- PGADMIN_CONFIG_SERVER_MODE
|
|
||||||
- PGADMIN_CONFIG_DEFAULT_SERVER
|
|
||||||
- PGADMIN_CONFIG_DEFAULT_SERVER_PORT
|
|
||||||
- PGADMIN_CONFIG_PASSWORD_LENGTH_MIN
|
|
||||||
- PGADMIN_CONFIG_MAX_SESSION_IDLE_TIME
|
|
||||||
- PGADMIN_CONFIG_CONFIG_DATABASE_URI
|
|
||||||
- PGADMIN_CONFIG_ALLOW_SAVE_PASSWORD
|
|
||||||
- PGADMIN_CONFIG_MAX_QUERY_HIST_STORED
|
|
||||||
- PGADMIN_CONFIG_MAIL_SERVER
|
|
||||||
- PGADMIN_CONFIG_MAIL_PORT
|
|
||||||
- PGADMIN_CONFIG_MAIL_USE_SSL
|
|
||||||
- PGADMIN_CONFIG_MAIL_USE_TLS
|
|
||||||
- PGADMIN_CONFIG_MAIL_USERNAME
|
|
||||||
- PGADMIN_CONFIG_MAIL_PASSWORD
|
|
||||||
- PGADMIN_CONFIG_MAIL_DEBUG
|
|
||||||
- PGADMIN_CONFIG_SECURITY_EMAIL_SENDER
|
|
||||||
- PGADMIN_CONFIG_ALLOW_SAVE_TUNNEL_PASSWORD
|
|
||||||
- PGADMIN_CONFIG_MAX_LOGIN_ATTEMPTS
|
|
||||||
networks:
|
|
||||||
- internal
|
|
||||||
|
|
||||||
volumes:
|
|
||||||
pgadmin-data:
|
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
|
||||||
|
|
||||||
services:
|
services:
|
||||||
odoo:
|
odoo:
|
||||||
build:
|
build:
|
||||||
@@ -12,8 +14,9 @@ services:
|
|||||||
- ENTERPRISE_ADDONS
|
- ENTERPRISE_ADDONS
|
||||||
- THIRD_PARTY_ADDONS
|
- THIRD_PARTY_ADDONS
|
||||||
- LOG_PATH
|
- LOG_PATH
|
||||||
depends_on:
|
- USE_REDIS
|
||||||
- postgres
|
- USE_S3
|
||||||
|
- USE_SENTRY
|
||||||
tty: true
|
tty: true
|
||||||
volumes:
|
volumes:
|
||||||
- odoo-data:${DATA_DIR}
|
- odoo-data:${DATA_DIR}
|
||||||
@@ -27,6 +30,9 @@ services:
|
|||||||
- PASSWORD=${DB_PASSWORD}
|
- PASSWORD=${DB_PASSWORD}
|
||||||
- ODOO_TAG
|
- ODOO_TAG
|
||||||
- ODOO_RC
|
- ODOO_RC
|
||||||
|
- USE_REDIS
|
||||||
|
- USE_S3
|
||||||
|
- USE_SENTRY
|
||||||
- THIRD_PARTY_ADDONS
|
- THIRD_PARTY_ADDONS
|
||||||
- ODOO_SESSION_REDIS
|
- ODOO_SESSION_REDIS
|
||||||
- ODOO_SESSION_REDIS_HOST
|
- ODOO_SESSION_REDIS_HOST
|
||||||
@@ -46,6 +52,7 @@ services:
|
|||||||
- AWS_BUCKETNAME
|
- AWS_BUCKETNAME
|
||||||
networks:
|
networks:
|
||||||
- internal
|
- internal
|
||||||
|
profiles: [$ODOO_PROFILES]
|
||||||
|
|
||||||
postgres:
|
postgres:
|
||||||
build:
|
build:
|
||||||
@@ -71,34 +78,7 @@ services:
|
|||||||
- PGADMIN_DB_PASSWORD
|
- PGADMIN_DB_PASSWORD
|
||||||
networks:
|
networks:
|
||||||
- internal
|
- internal
|
||||||
|
profiles: [$POSTGRES_PROFILES]
|
||||||
redis:
|
|
||||||
image: eqalpha/keydb:${KEYDB_TAG}
|
|
||||||
platform: linux/amd64
|
|
||||||
ports:
|
|
||||||
- ${KEYDB_PORT}:${KEYDB_PORT}
|
|
||||||
restart: unless-stopped
|
|
||||||
volumes:
|
|
||||||
- redis-data:${KEYDB_DATA}
|
|
||||||
networks:
|
|
||||||
- internal
|
|
||||||
|
|
||||||
s3:
|
|
||||||
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}"
|
|
||||||
volumes:
|
|
||||||
- s3-data:${MINIO_DATA}
|
|
||||||
ports:
|
|
||||||
- ${MINIO_API_PORT}:${MINIO_API_PORT}
|
|
||||||
- ${MINIO_CONSOLE_PORT}:${MINIO_CONSOLE_PORT}
|
|
||||||
networks:
|
|
||||||
- internal
|
|
||||||
|
|
||||||
nginx:
|
nginx:
|
||||||
image: nginx:${NGINX_TAG}
|
image: nginx:${NGINX_TAG}
|
||||||
@@ -118,6 +98,7 @@ services:
|
|||||||
- CORS_ALLOWED_DOMAIN
|
- CORS_ALLOWED_DOMAIN
|
||||||
networks:
|
networks:
|
||||||
- internal
|
- internal
|
||||||
|
profiles: [$NGINX_PROFILES]
|
||||||
|
|
||||||
nginx-proxy:
|
nginx-proxy:
|
||||||
image: nginxproxy/nginx-proxy:${NGINX_PROXY_TAG}
|
image: nginxproxy/nginx-proxy:${NGINX_PROXY_TAG}
|
||||||
@@ -128,24 +109,119 @@ services:
|
|||||||
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}
|
||||||
- certs:${NGINX_CERTS}:ro
|
|
||||||
- vhost:${NGINX_VHOST}
|
|
||||||
- html:${NGINX_HTML}
|
- html:${NGINX_HTML}
|
||||||
|
- vhost:${NGINX_VHOST}
|
||||||
|
- certs:${NGINX_CERTS}:ro
|
||||||
- ${DOCKER_SOCK}:${TEMP_DOCKER_SOCK}:ro
|
- ${DOCKER_SOCK}:${TEMP_DOCKER_SOCK}:ro
|
||||||
environment:
|
environment:
|
||||||
- TRUST_DOWNSTREAM_PROXY
|
- TRUST_DOWNSTREAM_PROXY
|
||||||
- CORS_ALLOWED_DOMAIN
|
- CORS_ALLOWED_DOMAIN
|
||||||
networks:
|
networks:
|
||||||
- internal
|
- internal
|
||||||
|
profiles: [$NGINX_PROXY_PROFILES]
|
||||||
|
|
||||||
|
redis:
|
||||||
|
image: eqalpha/keydb:${KEYDB_TAG}
|
||||||
|
platform: linux/amd64
|
||||||
|
ports:
|
||||||
|
- ${KEYDB_PORT}:${KEYDB_PORT}
|
||||||
|
restart: unless-stopped
|
||||||
|
volumes:
|
||||||
|
- redis-data:${KEYDB_DATA}
|
||||||
|
networks:
|
||||||
|
- internal
|
||||||
|
profiles: [$KEYDB_PROFILES]
|
||||||
|
|
||||||
|
s3:
|
||||||
|
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}"
|
||||||
|
volumes:
|
||||||
|
- s3-data:${MINIO_DATA}
|
||||||
|
ports:
|
||||||
|
- ${MINIO_API_PORT}:${MINIO_API_PORT}
|
||||||
|
- ${MINIO_CONSOLE_PORT}:${MINIO_CONSOLE_PORT}
|
||||||
|
networks:
|
||||||
|
- internal
|
||||||
|
profiles: [$MINIO_PROFILES]
|
||||||
|
|
||||||
|
letsencrypt:
|
||||||
|
image: nginxproxy/acme-companion:${ACME_COMPANION_TAG}
|
||||||
|
depends_on:
|
||||||
|
- nginx-proxy
|
||||||
|
restart: unless-stopped
|
||||||
|
volumes_from:
|
||||||
|
- nginx-proxy:rw
|
||||||
|
volumes:
|
||||||
|
- certs:${NGINX_CERTS}:rw
|
||||||
|
- acme:${NGINX_ACME}
|
||||||
|
- ${DOCKER_SOCK}:${DOCKER_SOCK}:ro
|
||||||
|
environment:
|
||||||
|
- ACME_CA_URI
|
||||||
|
- CERTS_UPDATE_INTERVAL
|
||||||
|
- DEFAULT_EMAIL
|
||||||
|
networks:
|
||||||
|
- internal
|
||||||
|
profiles: [$ACME_COMPANION_PROFILES]
|
||||||
|
|
||||||
|
pgadmin:
|
||||||
|
build:
|
||||||
|
context: ./
|
||||||
|
dockerfile: ./pgadmin/Dockerfile
|
||||||
|
args:
|
||||||
|
- PGADMIN_TAG
|
||||||
|
depends_on:
|
||||||
|
- postgres
|
||||||
|
restart: 'no'
|
||||||
|
expose:
|
||||||
|
- 80
|
||||||
|
volumes:
|
||||||
|
- pgadmin-data:${PGADMIN_DATA}
|
||||||
|
environment:
|
||||||
|
- PGADMIN_DEFAULT_EMAIL
|
||||||
|
- PGADMIN_DEFAULT_PASSWORD
|
||||||
|
- VIRTUAL_HOST=${PGADMIN_VIRTUAL_HOST}
|
||||||
|
- LETSENCRYPT_HOST=${PGADMIN_LETSENCRYPT_HOST}
|
||||||
|
- LETSENCRYPT_EMAIL=${PGADMIN_LETSENCRYPT_EMAIL}
|
||||||
|
- PGADMIN_CONFIG_APP_NAME
|
||||||
|
- PGADMIN_CONFIG_CONFIG_DATABASE_CONNECTION_POOL_SIZE
|
||||||
|
- PGADMIN_CONFIG_SERVER_MODE
|
||||||
|
- PGADMIN_CONFIG_DEFAULT_SERVER
|
||||||
|
- PGADMIN_CONFIG_DEFAULT_SERVER_PORT
|
||||||
|
- PGADMIN_CONFIG_PASSWORD_LENGTH_MIN
|
||||||
|
- PGADMIN_CONFIG_MAX_SESSION_IDLE_TIME
|
||||||
|
- PGADMIN_CONFIG_CONFIG_DATABASE_URI
|
||||||
|
- PGADMIN_CONFIG_ALLOW_SAVE_PASSWORD
|
||||||
|
- PGADMIN_CONFIG_MAX_QUERY_HIST_STORED
|
||||||
|
- PGADMIN_CONFIG_MAIL_SERVER
|
||||||
|
- PGADMIN_CONFIG_MAIL_PORT
|
||||||
|
- PGADMIN_CONFIG_MAIL_USE_SSL
|
||||||
|
- PGADMIN_CONFIG_MAIL_USE_TLS
|
||||||
|
- PGADMIN_CONFIG_MAIL_USERNAME
|
||||||
|
- PGADMIN_CONFIG_MAIL_PASSWORD
|
||||||
|
- PGADMIN_CONFIG_MAIL_DEBUG
|
||||||
|
- PGADMIN_CONFIG_SECURITY_EMAIL_SENDER
|
||||||
|
- PGADMIN_CONFIG_ALLOW_SAVE_TUNNEL_PASSWORD
|
||||||
|
- PGADMIN_CONFIG_MAX_LOGIN_ATTEMPTS
|
||||||
|
networks:
|
||||||
|
- internal
|
||||||
|
profiles: [$PGADMIN_PROFILES]
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
odoo-data:
|
odoo-data:
|
||||||
pg-data:
|
pg-data:
|
||||||
redis-data:
|
redis-data:
|
||||||
s3-data:
|
s3-data:
|
||||||
certs:
|
pgadmin-data:
|
||||||
vhost:
|
|
||||||
html:
|
html:
|
||||||
|
vhost:
|
||||||
|
certs:
|
||||||
|
acme:
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
internal:
|
internal:
|
||||||
|
|||||||
@@ -16,6 +16,9 @@ ARG GITHUB_ACCESS_TOKEN
|
|||||||
ARG ENTERPRISE_ADDONS
|
ARG ENTERPRISE_ADDONS
|
||||||
ARG THIRD_PARTY_ADDONS
|
ARG THIRD_PARTY_ADDONS
|
||||||
ARG ODOO_RC
|
ARG ODOO_RC
|
||||||
|
ARG USE_REDIS
|
||||||
|
ARG USE_S3
|
||||||
|
ARG USE_SENTRY
|
||||||
|
|
||||||
ENV ODOO_TAG=${ODOO_TAG} \
|
ENV ODOO_TAG=${ODOO_TAG} \
|
||||||
LOG_PATH=${LOG_PATH} \
|
LOG_PATH=${LOG_PATH} \
|
||||||
@@ -23,7 +26,10 @@ ENV ODOO_TAG=${ODOO_TAG} \
|
|||||||
GITHUB_ACCESS_TOKEN=${GITHUB_ACCESS_TOKEN} \
|
GITHUB_ACCESS_TOKEN=${GITHUB_ACCESS_TOKEN} \
|
||||||
ENTERPRISE_ADDONS=${ENTERPRISE_ADDONS} \
|
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_S3=${USE_S3} \
|
||||||
|
USE_SENTRY=${USE_SENTRY}
|
||||||
|
|
||||||
#------------------------#
|
#------------------------#
|
||||||
# APT Dependencies #
|
# APT Dependencies #
|
||||||
|
|||||||
@@ -14,6 +14,22 @@ while IFS='=' read -r key value || [[ -n $key ]]; do
|
|||||||
eval "$key=\"$value\""
|
eval "$key=\"$value\""
|
||||||
done < .env
|
done < .env
|
||||||
|
|
||||||
|
# Check the USE_REDIS to add base_attachment_object_storage & session_redis to LOAD variable
|
||||||
|
if [[ $USE_REDIS == "true" ]]; then
|
||||||
|
LOAD+=",session_redis"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Check the USE_REDIS to add attachment_s3 to LOAD variable
|
||||||
|
if [[ $USE_S3 == "true" ]]; then
|
||||||
|
LOAD+=",base_attachment_object_storage"
|
||||||
|
LOAD+=",attachment_s3"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Check the USE_REDIS to add sentry to LOAD variable
|
||||||
|
if [[ $USE_SENTRY == "true" ]]; then
|
||||||
|
LOAD+=",sentry"
|
||||||
|
fi
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
-- | odoo)
|
-- | odoo)
|
||||||
shift
|
shift
|
||||||
@@ -25,14 +41,14 @@ case "$1" in
|
|||||||
|
|
||||||
if [ ${APP_ENV} = 'fresh' ] || [ ${APP_ENV} = 'restore' ]; then
|
if [ ${APP_ENV} = 'fresh' ] || [ ${APP_ENV} = 'restore' ]; then
|
||||||
# Ideal for a fresh install or restore a production database.
|
# Ideal for a fresh install or restore a production database.
|
||||||
echo odoo --config ${ODOO_RC} --database= --init= --update= --load=${SERVER_WIDE_MODULES} --log-level=${LOG_LEVEL} --load-language= --workers=0 --limit-time-cpu=3600 --limit-time-real=7200
|
echo odoo --config ${ODOO_RC} --database= --init= --update= --load=${LOAD} --log-level=${LOG_LEVEL} --load-language= --workers=0 --limit-time-cpu=3600 --limit-time-real=7200
|
||||||
|
|
||||||
exec odoo --config ${ODOO_RC} --database= --init= --update= --load-language= --workers=0 --limit-time-cpu=3600 --limit-time-real=7200
|
exec odoo --config ${ODOO_RC} --database= --init= --update= --load-language= --workers=0 --limit-time-cpu=3600 --limit-time-real=7200
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ${APP_ENV} = 'local' ] ; then
|
if [ ${APP_ENV} = 'local' ] ; then
|
||||||
# Listens to all .env variables mapped into odoo.conf file.
|
# Listens to all .env variables mapped into odoo.conf file.
|
||||||
echo odoo --config ${ODOO_RC}
|
echo odoo --config ${ODOO_RC} --database=${DB_NAME} --init=${INIT} --update=${UPDATE} --load=${LOAD} --workers=${WORKERS} --log-level=${LOG_LEVEL} --dev=${DEV_MODE}
|
||||||
|
|
||||||
exec odoo --config ${ODOO_RC}
|
exec odoo --config ${ODOO_RC}
|
||||||
fi
|
fi
|
||||||
@@ -46,21 +62,21 @@ case "$1" in
|
|||||||
|
|
||||||
if [ ${APP_ENV} = 'testing' ] ; then
|
if [ ${APP_ENV} = 'testing' ] ; then
|
||||||
# Initializies a fresh 'test_*' database, installs the addons to test, and runs tests you specify in the test tags.
|
# Initializies a fresh 'test_*' database, installs the addons to test, and runs tests you specify in the test tags.
|
||||||
echo odoo --config ${ODOO_RC} --database=test_${DB_NAME} --test-enable --test-tags ${TEST_TAGS} --init=${ADDONS_TO_TEST} --update=${ADDONS_TO_TEST} --load=${SERVER_WIDE_MODULES} --log-level=${LOG_LEVEL} --without-demo= --workers=0 --dev= --stop-after-init
|
echo odoo --config ${ODOO_RC} --database=test_${DB_NAME} --test-enable --test-tags ${TEST_TAGS} --init=${ADDONS_TO_TEST} --update=${ADDONS_TO_TEST} --load=${LOAD} --log-level=${LOG_LEVEL} --without-demo= --workers=0 --dev= --stop-after-init
|
||||||
|
|
||||||
exec odoo --config ${ODOO_RC} --database=test_${DB_NAME} --test-enable --test-tags ${TEST_TAGS} --init=${ADDONS_TO_TEST} --update=${ADDONS_TO_TEST} --without-demo= --workers=0 --dev= --stop-after-init
|
exec odoo --config ${ODOO_RC} --database=test_${DB_NAME} --test-enable --test-tags ${TEST_TAGS} --init=${ADDONS_TO_TEST} --update=${ADDONS_TO_TEST} --without-demo= --workers=0 --dev= --stop-after-init
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ${APP_ENV} = 'staging' ] ; then
|
if [ ${APP_ENV} = 'staging' ] ; then
|
||||||
# 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=${SERVER_WIDE_MODULES} --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} --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= --init= --update= --load=${SERVER_WIDE_MODULES} --workers=${WORKERS} --log-level=${LOG_LEVEL} --load-language= --without-demo=all --dev=
|
echo odoo --config ${ODOO_RC} --database= --init= --update= --load=${LOAD} --workers=${WORKERS} --log-level=${LOG_LEVEL} --load-language= --without-demo=all --dev=
|
||||||
|
|
||||||
exec odoo --config ${ODOO_RC} --database= --init= --update= --load-language= --without-demo=all --dev=
|
exec odoo --config ${ODOO_RC} --database= --init= --update= --load-language= --without-demo=all --dev=
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -20,6 +20,22 @@ while IFS='=' read -r key value || [[ -n $key ]]; do
|
|||||||
export "$key=$value"
|
export "$key=$value"
|
||||||
done < .env
|
done < .env
|
||||||
|
|
||||||
|
# Check the USE_REDIS to add base_attachment_object_storage & session_redis to LOAD variable
|
||||||
|
if [[ $USE_REDIS == "true" ]]; then
|
||||||
|
LOAD+=",session_redis"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Check the USE_REDIS to add attachment_s3 to LOAD variable
|
||||||
|
if [[ $USE_S3 == "true" ]]; then
|
||||||
|
LOAD+=",base_attachment_object_storage"
|
||||||
|
LOAD+=",attachment_s3"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Check the USE_REDIS to add sentry to LOAD variable
|
||||||
|
if [[ $USE_SENTRY == "true" ]]; then
|
||||||
|
LOAD+=",sentry"
|
||||||
|
fi
|
||||||
|
|
||||||
# Copy the example conf to the destination to start replacing the variables
|
# Copy the example conf to the destination to start replacing the variables
|
||||||
cp "$TEMPLATE_CONF" "$ODOO_RC"
|
cp "$TEMPLATE_CONF" "$ODOO_RC"
|
||||||
|
|
||||||
|
|||||||
@@ -2,16 +2,23 @@
|
|||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
# Check if the repository directory exists
|
# Check if the repository directory exists and either Redis or S3 is to be used
|
||||||
if [ ! -d "odoo-cloud-platform" ]; then
|
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;
|
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
|
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/base_attachment_object_storage ${THIRD_PARTY_ADDONS}/base_attachment_object_storage
|
||||||
cp -r odoo-cloud-platform/attachment_s3 ${THIRD_PARTY_ADDONS}/attachment_s3
|
cp -r odoo-cloud-platform/attachment_s3 ${THIRD_PARTY_ADDONS}/attachment_s3
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Check if the repository directory exists
|
# Check if the repository directory exists and Sentry is to be used
|
||||||
if [ ! -d "server-tools" ]; then
|
if [[ ${USE_SENTRY} == "true" ]]; then
|
||||||
git clone https://github.com/odoocker/server-tools.git --depth 1 --branch ${ODOO_TAG} --single-branch --no-tags;
|
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
|
cp -r server-tools/sentry ${THIRD_PARTY_ADDONS}/sentry
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user