Skip to content

Commit

Permalink
Add PSQL as docker compose service
Browse files Browse the repository at this point in the history
Ref: #24
  • Loading branch information
projkov committed Mar 25, 2024
1 parent 0cba314 commit 1a25586
Showing 1 changed file with 29 additions and 2 deletions.
31 changes: 29 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,31 @@ services:
volumes:
- ./data:/opt/inferno/data
depends_on:
- validator-service
validator-service:
condition: service_started
postgres:
condition: service_healthy
environment:
POSTGRES_HOST: postgres
POSTGRES_PASSWORD: password
POSTGRES_DB: inferno
POSTGRES_USER: postgres
worker:
build:
context: ./
volumes:
- ./data:/opt/inferno/data
command: bundle exec sidekiq -r ./worker.rb
depends_on:
- redis
redis:
condition: service_started
postgres:
condition: service_healthy
environment:
POSTGRES_HOST: postgres
POSTGRES_PASSWORD: password
POSTGRES_DB: inferno
POSTGRES_USER: postgres
validator-service:
extends:
file: docker-compose.background.yml
Expand All @@ -33,3 +49,14 @@ services:
extends:
file: docker-compose.background.yml
service: redis
postgres:
image: postgres:16.2-alpine3.19
restart: always
healthcheck:
test: [ "CMD", "pg_isready", "-U", "postgres" ]
interval: 5s
timeout: 5s
retries: 5
environment:
POSTGRES_PASSWORD: password
POSTGRES_DB: inferno

0 comments on commit 1a25586

Please sign in to comment.