florin
(florin)
1
curl https://foss.heptapod.net/tryton/tryton-docker/-/raw/branch/default/compose.yml -o compose.yml
docker compose -f compose.yml -p tryton up
for some odd reason the compose file dont provide a database, and docker was supposed to remove the “works on my machine”
ced
(Cédric Krier)
2
Please provide the logs of the docker compose
florin
(florin)
3
here my fixed version, removing :- from the variables did the trick
services:
server:
image: tryton/tryton:${VERSION}
environment:
- DB_PASSWORD=${DB_PASSWORD}
ports:
- "8000:8000"
volumes:
- "tryton-data:/var/lib/trytond/db"
command:
- /bin/bash
- -c
- |
(until echo > /dev/tcp/$${DB_HOSTNAME:=$${POSTGRES_PORT_5432_TCP_ADDR:='postgres'}}/$${DB_PORT:=$${POSTGRES_PORT_5432_TCP_PORT:='5432'}}; do sleep 0.5; done) 2>/dev/null
echo "${PASSWORD}" > /tmp/.passwd
TRYTONPASSFILE=/tmp/.passwd /entrypoint.sh trytond-admin -d "${DB_NAME}" --all --email "${EMAIL}" -vv
if command -v uwsgi &>/dev/null; then uwsgi --ini /etc/uwsgi.conf; else gunicorn --config=/etc/gunicorn.conf.py; fi
depends_on:
- postgres
cron:
image: tryton/tryton:${VERSION}
environment:
- DB_PASSWORD=${DB_PASSWORD}
volumes:
- "tryton-data:/var/lib/trytond/db"
command:
- /bin/bash
- -c
- |
(until echo > /dev/tcp/tryton/8000; do sleep 0.5; done) 2>/dev/null
trytond-cron -d "${DB_NAME}"
depends_on:
- postgres
- server
postgres:
image: postgres:${PG_VERSION}
environment:
- POSTGRES_PASSWORD=${DB_PASSWORD}
- POSTGRES_DB=${DB_NAME}
volumes:
- "postgres-data:/var/lib/postgresql/data"
volumes:
postgres-data:
tryton-data:
.env file
# Tryton image
VERSION=latest
# environment
DB_PASSWORD=your_db_test
# database
DB_NAME=tryton_test
DB_HOSTNAME=postgres
DB_PORT=5432
# Tryton admin settings
PASSWORD=admin_test
EMAIL=<-removed->
# PostgreSQL version
PG_VERSION=latest
ced
(Cédric Krier)
4
ced
(Cédric Krier)
Split this topic
5
system
(system)
Closed
6
This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.