Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions .copier-answers.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Changes here will be overwritten by Copier; NEVER EDIT MANUALLY
_commit: v9.6.1
_commit: v10.0.5
_src_path: gh:Tecnativa/doodba-copier-template
backup_deletion: false
backup_dst: boto3+s3://man18-backup
Expand Down Expand Up @@ -54,8 +54,6 @@ smtp_relay_user: manmanufacturing.com
smtp_relay_version: latest
traefik_version: 3
use_refurb: true
whitelist_docker_project_devel: man18
whitelist_docker_project_test: demo-man18-19
whitelisted_hosts_devel:
- cdnjs.cloudflare.com
- fonts.googleapis.com
Expand Down
1 change: 0 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ repos:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: debug-statements

- id: check-case-conflict
- id: check-docstring-first
- id: check-executables-have-shebangs
Expand Down
1 change: 0 additions & 1 deletion .ruff.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
target-version = "py310"
fix = true
cache-dir = "~/.cache/ruff"

[lint]
extend-select = [
"B",
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[![Doodba deployment](https://img.shields.io/badge/deployment-doodba-informational)](https://github.com/Tecnativa/doodba)
[![Last template update](https://img.shields.io/badge/last%20template%20update-v9.6.1-informational)](https://github.com/Tecnativa/doodba-copier-template/tree/v9.6.1)
[![Last template update](https://img.shields.io/badge/last%20template%20update-v10.0.5-informational)](https://github.com/Tecnativa/doodba-copier-template/tree/v10.0.5)
[![Odoo](https://img.shields.io/badge/odoo-v19.0-a3478a)](https://github.com/odoo/odoo/tree/19.0)
[![Deployment data](https://img.shields.io/badge/%F0%9F%8C%90%20prod-manmanufacturing.com-green)](http://manmanufacturing.com)
[![Deployment data](https://img.shields.io/badge/%E2%9A%92%20demo-test.manmanufacturing.com-yellow)](http://test.manmanufacturing.com)
Expand Down
19 changes: 18 additions & 1 deletion common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,13 @@ services:
ODOO_VERSION: "19.0"
UID: "${UID:-1000}"
GID: "${GID:-1000}"
GITHUB_TOKEN: "${DOODBA_GITHUB_TOKEN:-}"
environment:
EMAIL_FROM: "notifications@manmanufacturing.com"
PGDATABASE: &dbname prod
PGUSER: &dbuser "odoo"
PROXY_MODE: "true"
GITHUB_TOKEN: "${DOODBA_GITHUB_TOKEN:-}"
tty: true
volumes:
- filestore:/var/lib/odoo
Expand All @@ -22,7 +24,15 @@ services:
traefik.docker.network: "inverseproxy_shared"
traefik.frontend.passHostHeader: "true"
traefik.port: "8069"

gatekeeper:
image: ghcr.io/tecnativa/egress-gatekeeper:latest
cap_add:
- NET_ADMIN
labels:
traefik.backend.buffering.retryExpression: IsNetworkError() && Attempts() < 5
traefik.docker.network: "inverseproxy_shared"
traefik.frontend.passHostHeader: "true"
traefik.port: "8069"
db:
image: ghcr.io/tecnativa/postgres-autoconf:18-alpine
shm_size: 4gb
Expand All @@ -34,6 +44,13 @@ services:
work_mem = 512MB
volumes:
- db:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -q -d $$POSTGRES_DB -U $$POSTGRES_USER"]
interval: 30s
timeout: 5s
retries: 5
start_period: 15s
start_interval: 1s

smtpfake:
image: docker.io/axllent/mailpit
Expand Down
92 changes: 39 additions & 53 deletions devel.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ services:
- "127.0.0.1:${PORT_PREFIX:-19}072:8072"
environment:
PORT: "6899 8069 8072"
TARGET: odoo
TARGET: gatekeeper

odoo:
extends:
file: common.yaml
service: odoo
build:
args:
# To aggregate in development, use `setup-devel.yaml`
# To aggregate in development, run the devel-setup service
AGGREGATE: "false"
# Export these variables to own files created by odoo in your filesystem
UID: "${UID:-1000}"
Expand Down Expand Up @@ -48,13 +48,15 @@ services:
- ./odoo/custom:/opt/odoo/custom:ro,z
- ./odoo/auto:/opt/odoo/auto:rw,z
depends_on:
- db
- smtp
- wdb
- proxy_general
networks:
default:
whitelist:
db:
condition: service_healthy
smtp:
condition: service_started
wdb:
condition: service_started
gatekeeper:
condition: service_healthy
network_mode: service:gatekeeper
command:
- odoo
- --limit-memory-soft=0
Expand All @@ -64,18 +66,41 @@ services:
- --dev=reload,qweb,werkzeug,xml,access
- --from-filter=manmanufacturing.com

devel-setup:
profiles: ["devel-setup"]
extends: odoo
entrypoint: autoaggregate
network_mode: host
environment:
DEPTH_DEFAULT: 100
# XXX Export these variables before running setup to own the files
UID: "${DOODBA_GITAGGREGATE_UID:-1000}"
GID: "${DOODBA_GITAGGREGATE_GID:-1000}"
UMASK: "$DOODBA_UMASK"
depends_on: !override []
user: root
volumes: !override
- ./odoo/custom/src:/opt/odoo/custom/src:rw,z
gatekeeper:
extends:
file: common.yaml
service: gatekeeper
environment:
REFRESH_INTERVAL: 300
ALLOWED_HOSTS: >-
cdnjs.cloudflare.com fonts.googleapis.com fonts.gstatic.com www.google.com
www.googleapis.com www.gravatar.com
networks:
default:
public:

db:
extends:
file: common.yaml
service: db
environment:
POSTGRES_DB: *dbname
POSTGRES_PASSWORD: odoopassword
healthcheck:
test: ["CMD-SHELL", "pg_isready -q -d $$POSTGRES_DB -U $$POSTGRES_USER"]
interval: 5s
timeout: 5s
retries: 5

pgweb:
image: docker.io/sosedoff/pgweb
Expand Down Expand Up @@ -137,49 +162,10 @@ services:
- "127.0.0.1:${PORT_PREFIX:-19}984:1984"
# HACK https://github.com/Kozea/wdb/issues/136
init: true

odoo_net_setup:
image: ghcr.io/tecnativa/docker-whitelist-gateway-service:edge
network_mode: "service:odoo"
cap_add:
- NET_ADMIN
depends_on:
- odoo
- proxy_general
healthcheck:
disable: true
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
environment:
MODE_RUN: "net_setup"
GATEWAY_NAME: "proxy_general"
DNS_LOCAL: "1"
DNS_INTERNAL_FROM_DOCKER: "1"
DOCKER_PROJECT: "${COMPOSE_PROJECT_NAME:-man18}"
DOCKER_PRIMARY_SERVICE: "odoo"
ALLOWED_HOSTS: &proxy_allowed_hosts >-
cdnjs.cloudflare.com fonts.googleapis.com fonts.gstatic.com www.google.com
www.googleapis.com www.gravatar.com

proxy_general:
image: ghcr.io/tecnativa/docker-whitelist-gateway-service:edge
cap_add:
- NET_ADMIN
sysctls:
net.ipv4.ip_forward: "1"
networks:
whitelist:
aliases:
- proxy_general
public:
environment:
MODE_RUN: "gateway"
ALLOWED_HOSTS: *proxy_allowed_hosts
networks:
default:
internal: ${DOODBA_NETWORK_INTERNAL-true}
public:
whitelist:

volumes:
filestore:
Expand Down
86 changes: 28 additions & 58 deletions migration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,28 +11,47 @@ services:
LIST_DB: "true"
ODOO_BUS_PUBLIC_SAMESITE_WS: 1
# To install demo data export DOODBA_WITHOUT_DEMO=false
WITHOUT_DEMO: "${DOODBA_WITHOUT_DEMO-all}"
WITHOUT_DEMO: "${DOODBA_WITHOUT_DEMO-True}"
SMTP_PORT: "1025"
SMTP_SERVER: smtplocal
# Just in case you use queue_job
ODOO_QUEUE_JOB_CHANNELS: "root:1"
PGHOST: man18-19-0-test-db
restart: unless-stopped
depends_on:
- db
- smtp
- proxy_general
networks:
default:
globalwhitelist_shared:
whitelist:
db:
condition: service_healthy
smtp:
condition: service_started
gatekeeper:
condition: service_healthy
network_mode: service:gatekeeper
labels:
doodba.domain.main: ""
command:
- odoo
- --workers=3
- --max-cron-threads=1

gatekeeper:
extends:
file: common.yaml
service: gatekeeper
environment:
REFRESH_INTERVAL: 300
ALLOWED_HOSTS: >-
accounts.google.com api.openrouteservice.org api.unsplash.com apis.google.com
cdnjs.cloudflare.com download.geonames.org ec.europa.eu fonts.cdnfonts.com
fonts.googleapis.com fonts.gstatic.com images.unsplash.com iap-services.odoo.com
maps.googleapis.com media-api.odoo.com olg.api.odoo.com www.google.com
www.googleapis.com www.gravatar.com undraw.co updates.maxmind.com
www.ecb.europa.eu www.xe.com sis-t.redsys.es prewww1.aeat.es
www2.agenciatributaria.gob.es www.openstreetmap.org nominatim.openstreetmap.org
www.bizkaia.eus sii.araba.eus vies.api.odoo.com
networks:
default:
public:
labels:
doodba.domain.main: ""
db:
extends:
file: common.yaml
Expand Down Expand Up @@ -64,64 +83,15 @@ services:
command:
- test -r /etc/mailhog/auth && export MH_AUTH_FILE=/etc/mailhog/auth; exec MailHog

odoo_net_setup:
image: ghcr.io/tecnativa/docker-whitelist-gateway-service:edge
network_mode: "service:odoo"
cap_add:
- NET_ADMIN
depends_on:
- odoo
- proxy_general
healthcheck:
disable: true
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
environment:
MODE_RUN: "net_setup"
GATEWAY_NAME: "proxy_general"
DNS_LOCAL: "1"
DNS_INTERNAL_FROM_DOCKER: "1"
DOCKER_PROJECT: "${COMPOSE_PROJECT_NAME:-demo-man18-19}"
DOCKER_PRIMARY_SERVICE: "odoo"
ALLOWED_HOSTS: &proxy_allowed_hosts >-
accounts.google.com api.openrouteservice.org api.unsplash.com apis.google.com
cdnjs.cloudflare.com download.geonames.org ec.europa.eu fonts.cdnfonts.com
fonts.googleapis.com fonts.gstatic.com images.unsplash.com iap-services.odoo.com
maps.googleapis.com media-api.odoo.com olg.api.odoo.com www.google.com
www.googleapis.com www.gravatar.com undraw.co updates.maxmind.com
www.ecb.europa.eu www.xe.com sis-t.redsys.es prewww1.aeat.es
www2.agenciatributaria.gob.es www.openstreetmap.org nominatim.openstreetmap.org
www.bizkaia.eus sii.araba.eus vies.api.odoo.com

proxy_general:
image: ghcr.io/tecnativa/docker-whitelist-gateway-service:edge
restart: unless-stopped
cap_add:
- NET_ADMIN
sysctls:
net.ipv4.ip_forward: "1"
networks:
whitelist:
aliases:
- proxy_general
public:
environment:
MODE_RUN: "gateway"
ALLOWED_HOSTS: *proxy_allowed_hosts

networks:
default:
internal: ${DOODBA_NETWORK_INTERNAL-true}
driver_opts:
encrypted: 1

globalwhitelist_shared:
external: true

inverseproxy_shared:
external: true
public:
whitelist:

volumes:
filestore:
Expand Down
39 changes: 0 additions & 39 deletions setup-devel.yaml

This file was deleted.

Loading
Loading