mirror of
https://github.com/odoocker/odoocker
synced 2025-11-04 15:19:22 +01:00
starting new ideas for docker-compose file
This commit is contained in:
152
docker-compose copy.yml
Normal file
152
docker-compose copy.yml
Normal file
@@ -0,0 +1,152 @@
|
|||||||
|
services:
|
||||||
|
odoo:
|
||||||
|
build:
|
||||||
|
context: ./
|
||||||
|
dockerfile: ./odoo/Dockerfile
|
||||||
|
args:
|
||||||
|
- ODOO_TAG
|
||||||
|
- ODOO_RC
|
||||||
|
- ROOT_PATH
|
||||||
|
- GITHUB_USER
|
||||||
|
- GITHUB_ACCESS_TOKEN
|
||||||
|
- ENTERPRISE_ADDONS
|
||||||
|
- THIRD_PARTY_ADDONS
|
||||||
|
- LOG_PATH
|
||||||
|
depends_on:
|
||||||
|
- postgres
|
||||||
|
tty: true
|
||||||
|
volumes:
|
||||||
|
- odoo-data:${DATA_DIR}
|
||||||
|
- ./odoo/extra-addons:${EXTRA_ADDONS}
|
||||||
|
- ./odoo/custom-addons:${CUSTOM_ADDONS}
|
||||||
|
- ./odoo/entrypoint.sh:/entrypoint.sh
|
||||||
|
environment:
|
||||||
|
- HOST=${DB_HOST}
|
||||||
|
- PORT=${DB_PORT}
|
||||||
|
- USER=${DB_USER}
|
||||||
|
- PASSWORD=${DB_PASSWORD}
|
||||||
|
- ODOO_TAG
|
||||||
|
- ODOO_RC
|
||||||
|
- THIRD_PARTY_ADDONS
|
||||||
|
- ODOO_SESSION_REDIS
|
||||||
|
- ODOO_SESSION_REDIS_HOST
|
||||||
|
- ODOO_SESSION_REDIS_PORT
|
||||||
|
- ODOO_SESSION_REDIS_PASSWORD
|
||||||
|
- ODOO_SESSION_REDIS_URL
|
||||||
|
- ODOO_SESSION_REDIS_PREFIX
|
||||||
|
- ODOO_SESSION_REDIS_SENTINEL_MASTER_NAME
|
||||||
|
- ODOO_SESSION_REDIS_SENTINEL_HOST
|
||||||
|
- ODOO_SESSION_REDIS_SENTINEL_PORT
|
||||||
|
- ODOO_SESSION_REDIS_EXPIRATION
|
||||||
|
- ODOO_SESSION_REDIS_EXPIRATION_ANONYMOUS
|
||||||
|
- AWS_HOST
|
||||||
|
- AWS_REGION
|
||||||
|
- AWS_ACCESS_KEY_ID
|
||||||
|
- AWS_SECRET_ACCESS_KEY
|
||||||
|
- AWS_BUCKETNAME
|
||||||
|
networks:
|
||||||
|
- internal
|
||||||
|
|
||||||
|
postgres:
|
||||||
|
build:
|
||||||
|
context: ./
|
||||||
|
dockerfile: ./postgres/Dockerfile
|
||||||
|
args:
|
||||||
|
- POSTGRES_TAG
|
||||||
|
restart: unless-stopped
|
||||||
|
tty: true
|
||||||
|
volumes:
|
||||||
|
- pg-data:${PGDATA}
|
||||||
|
- ./postgres/entrypoint.sh:/docker-entrypoint-initdb.d/entrypoint.sh
|
||||||
|
environment:
|
||||||
|
- POSTGRES_DB
|
||||||
|
- POSTGRES_USER
|
||||||
|
- POSTGRES_PASSWORD
|
||||||
|
- PGDATA
|
||||||
|
- DB_USER
|
||||||
|
- DB_TEMPLATE
|
||||||
|
- UNACCENT_TEMPLATE
|
||||||
|
- PGADMING_DB_NAME
|
||||||
|
- PGADMING_DB_USER
|
||||||
|
- PGADMIN_DB_PASSWORD
|
||||||
|
networks:
|
||||||
|
- internal
|
||||||
|
|
||||||
|
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:
|
||||||
|
image: nginx:${NGINX_TAG}
|
||||||
|
depends_on:
|
||||||
|
- odoo
|
||||||
|
restart: unless-stopped
|
||||||
|
tty: true
|
||||||
|
expose:
|
||||||
|
- 80/tcp
|
||||||
|
volumes:
|
||||||
|
- ./nginx/nginx.conf:${NGINX_CONF}
|
||||||
|
- ./nginx/default.conf:${NGINX_DEFAULT_CONF}
|
||||||
|
environment:
|
||||||
|
- VIRTUAL_HOST
|
||||||
|
- LETSENCRYPT_HOST
|
||||||
|
- LETSENCRYPT_EMAIL
|
||||||
|
- CORS_ALLOWED_DOMAIN
|
||||||
|
networks:
|
||||||
|
- internal
|
||||||
|
|
||||||
|
nginx-proxy:
|
||||||
|
image: nginxproxy/nginx-proxy:${NGINX_PROXY_TAG}
|
||||||
|
depends_on:
|
||||||
|
- nginx
|
||||||
|
restart: unless-stopped
|
||||||
|
tty: true
|
||||||
|
volumes:
|
||||||
|
- ./nginx-proxy/nginx.conf:${NGINX_CONF}
|
||||||
|
- ./nginx-proxy/cors.conf:${NGINX_PROXY_CORS_CONF}
|
||||||
|
- certs:${NGINX_CERTS}:ro
|
||||||
|
- vhost:${NGINX_VHOST}
|
||||||
|
- html:${NGINX_HTML}
|
||||||
|
- ${DOCKER_SOCK}:${TEMP_DOCKER_SOCK}:ro
|
||||||
|
environment:
|
||||||
|
- TRUST_DOWNSTREAM_PROXY
|
||||||
|
- CORS_ALLOWED_DOMAIN
|
||||||
|
networks:
|
||||||
|
- internal
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
odoo-data:
|
||||||
|
pg-data:
|
||||||
|
redis-data:
|
||||||
|
s3-data:
|
||||||
|
certs:
|
||||||
|
vhost:
|
||||||
|
html:
|
||||||
|
|
||||||
|
networks:
|
||||||
|
internal:
|
||||||
|
driver: bridge
|
||||||
49
docker-compose.override.local.full.yml
Normal file
49
docker-compose.override.local.full.yml
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
services:
|
||||||
|
odoo:
|
||||||
|
restart: 'no'
|
||||||
|
ports:
|
||||||
|
- 8069:8069
|
||||||
|
- 8070:8070
|
||||||
|
- 8071:8071
|
||||||
|
- 8072:8072
|
||||||
|
|
||||||
|
postgres:
|
||||||
|
restart: 'no'
|
||||||
|
ports:
|
||||||
|
- 5432:5432
|
||||||
|
|
||||||
|
nginx:
|
||||||
|
restart: 'no'
|
||||||
|
|
||||||
|
nginx-proxy:
|
||||||
|
restart: 'no'
|
||||||
|
ports:
|
||||||
|
- 80:80
|
||||||
|
|
||||||
|
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
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
|
||||||
|
|
||||||
services:
|
services:
|
||||||
odoo:
|
odoo:
|
||||||
build:
|
build:
|
||||||
@@ -27,6 +29,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
|
||||||
@@ -72,34 +77,6 @@ services:
|
|||||||
networks:
|
networks:
|
||||||
- internal
|
- internal
|
||||||
|
|
||||||
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}
|
||||||
depends_on:
|
depends_on:
|
||||||
@@ -128,9 +105,9 @@ 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
|
||||||
@@ -138,14 +115,44 @@ services:
|
|||||||
networks:
|
networks:
|
||||||
- internal
|
- internal
|
||||||
|
|
||||||
|
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: ["dev"]
|
||||||
|
|
||||||
|
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: ["dev"]
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
odoo-data:
|
odoo-data:
|
||||||
pg-data:
|
pg-data:
|
||||||
redis-data:
|
redis-data:
|
||||||
s3-data:
|
s3-data:
|
||||||
certs:
|
|
||||||
vhost:
|
|
||||||
html:
|
html:
|
||||||
|
vhost:
|
||||||
|
certs:
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
internal:
|
internal:
|
||||||
|
|||||||
@@ -2,16 +2,24 @@
|
|||||||
|
|
||||||
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 [[ ! -d "odoo-cloud-platform" && ( $USE_REDIS -eq 1 || $USE_S3 -eq 1 ) ]]; 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
|
||||||
|
|
||||||
|
# Check the USE_REDIS variable to decide whether to copy Redis directories
|
||||||
|
if [[ $USE_REDIS -eq 1 ]]; 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 -eq 1 ]]; 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 [[ ! -d "server-tools" && $USE_SENTRY -eq 1 ]]; 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