-
Notifications
You must be signed in to change notification settings - Fork 6
/
docker-compose.yaml
81 lines (78 loc) · 1.9 KB
/
docker-compose.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
services:
# Odoo
odoo:
build:
context: .
dockerfile: Dockerfile
args:
PYTHON_VERSION: "3.10"
UID: "${UID:-1000}"
GID: "${UID:-1000}"
target: base
depends_on:
- db
env_file:
- .env
environment:
UID: "${UID:-1000}"
GID: "${GID:-1000}"
UMASK: "${UMASK:-002}"
ODOO_DB_HOST: &dbhost ${DB_HOST:-db}
ODOO_DB_NAME: &dbname ${DB_NAME:-odoo}
ODOO_DB_PASSWORD: &dbpass $DB_PASSWORD
ODOO_DB_PORT: &dbport ${DB_PORT:-5432}
ODOO_DB_USER: &dbuser ${DB_USER:-odoo}
PGDATABASE: *dbname
PGHOST: *dbhost
PGPASSWORD: *dbpass
PGPORT: *dbport
PGUSER: *dbuser
SSH_AUTH_SOCK: /ssh-agent
image: dob:${DOB_TAG:-latest}
logging:
driver: "json-file"
options:
max-size: "${LOG_SIZE:-1g}"
max-file: "${LOG_COUNT:-5}"
networks:
default:
public:
ports:
- ${HTTP_PORT:-127.0.0.1:8069}:8069
- ${HTTP_LONGPOLLING_PORT:-127.0.0.1:8072}:8072
tty: true
user: odoo
volumes:
- ./filestore:/srv/odoo/filestore:rw,z
- ./odoo:/srv/odoo/odoo
# Mount the ssh agent and a pre-generated SSH known hosts
- ${SSH_AUTH_SOCK:-/dev/null}:/ssh-agent
- ./ssh/known_hosts:/srv/odoo/.ssh/known_hosts
healthcheck:
test: ["CMD", "curl", "-sfo", "/dev/null", "http://127.0.0.1:8069"]
interval: 15s
timeout: 1s
retries: 3
# Database
db:
image: postgres:${DB_VERSION:-latest}
environment:
POSTGRES_DB: *dbname
POSTGRES_USER: *dbuser
POSTGRES_PASSWORD: *dbpass
command: --work_mem=32MB
shm_size: 512mb
tty: true
volumes:
- db:/var/lib/postgresql/data:z
healthcheck:
test: ["CMD", "pg_isready", "-U", *dbuser, "-d", *dbname]
interval: 5s
timeout: 1s
retries: 3
networks:
default:
internal: True
public:
volumes:
db: