Files
ihrm/docker-compose.yaml
Ashwanth Balakrishnan 03ff0aec9c Dockerized the application (#119)
* dockerized the application

* Update docker.md

---------

Co-authored-by: Horilla <131998600+horilla-opensource@users.noreply.github.com>
2024-03-13 06:21:23 +00:00

39 lines
741 B
YAML

version: '3.8'
services:
server:
build:
context: .
dockerfile: Dockerfile
ports:
- 8000:8000
restart: unless-stopped
environment:
DATABASE_URL: "postgres://postgres:postgres@db:5432/horilla"
command: ./entrypoint.sh
depends_on:
db:
condition: service_healthy
db:
image: postgres:16-bullseye
environment:
POSTGRES_DB: horilla
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
ports:
- 5432:5432
restart: unless-stopped
volumes:
- horilla-data:/var/lib/postgresql/data
healthcheck:
test: ["CMD", "pg_isready", "-U", "postgres"]
interval: 10s
timeout: 5s
retries: 5
volumes:
horilla-data: