oxidetalis/docker-compose.yml
Awiteb 672d7a2d3c
All checks were successful
Write changelog / write-changelog (push) Successful in 3s
Update Contributors / Update Contributors (push) Successful in 4s
Rust CI / Rust CI (push) Successful in 5m33s
chore: Docker improvments
Replace `as` with `AS`
- Remove `version` from `docker-compose.yml`
- Add database configration to oxidetalis environment
- Add `healthcheck` for the database

Signed-off-by: Awiteb <a@4rs.nl>
2024-07-23 02:53:26 +03:00

40 lines
1 KiB
YAML

services:
oxidetalis:
container_name: oxidetalis
build:
context: ./
dockerfile: ./crates/oxidetalis/Dockerfile
environment:
# Logging level
- RUST_LOG=info
- OXIDETALIS_CONFIG=/app/config.toml
# In docker host
- OXIDETALIS_SERVER_HOST=0.0.0.0
# Connect to the below db
- OXIDETALIS_DB_HOST=db
- OXIDETALIS_DB_PORT=5432
- OXIDETALIS_DB_USER=oxidetalis
- OXIDETALIS_DB_PASSWORD=oxidetalis
- OXIDETALIS_DB_NAME=oxidetalis_db
ports:
- 127.0.0.1:7294:7294
depends_on:
- db
volumes:
- ./config.toml:/app/config.toml
db:
container_name: oxidetalis_postgres
image: postgres:latest
environment:
POSTGRES_USER: oxidetalis
POSTGRES_PASSWORD: oxidetalis
POSTGRES_DB: oxidetalis_db
healthcheck:
test: ["CMD-SHELL", "pg_isready", "-d", "db_prod"]
interval: 30s
timeout: 60s
retries: 5
start_period: 80s
# This for devlopment only
ports:
- 127.0.0.1:5432:5432