Demo about Edge Computing in the Retail vertical using Red Hat products
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

42 lines
938 B

[Unit]
Description=PostgreSQL Database Server
Documentation=https://www.postgresql.org/
After=network.target
# Only start if Odoo has been configured
ConditionPathExists=/etc/containers/systemd/configs/odoo-config.env
# Start/stop this unit when the target is started/stopped
PartOf=odoo.target
[Container]
ContainerName=odoo-db
Image=docker.io/library/postgres:17-alpine
# Network configuration
Network=host
# Environment variables from config
EnvironmentFile=/etc/containers/systemd/configs/odoo-db.env
# Volume mounts
Volume=/var/lib/postgresql/data:/var/lib/postgresql/data:Z
# Health check
HealthCmd=pg_isready -U odoo -d postgres
HealthInterval=30s
HealthTimeout=10s
HealthStartPeriod=60s
HealthRetries=3
[Service]
Restart=always
RestartSec=10
TimeoutStartSec=120
TimeoutStopSec=30
# Skaffold filesystem + fix permissions
ExecStartPre=install -m 0700 -o 70 -g 70 -d /var/lib/postgresql/data
[Install]
WantedBy=odoo.target