Skip to content

Commit

Permalink
improve docker setup
Browse files Browse the repository at this point in the history
  • Loading branch information
marc-aurele-besner committed Sep 19, 2024
1 parent a8ca8ac commit 0584eb7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
9 changes: 9 additions & 0 deletions docker-compose.prod.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
version: "3"

volumes:
db_data: {}

services:
postgres:
volumes:
- db_data:/var/lib/postgresql/data
- type: bind
source: /home/ubuntu/postgresql/conf/postgresql.conf
target: /etc/postgresql/postgresql.conf
read_only: true
logging:
driver: loki
options:
Expand Down
5 changes: 2 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: '3.8'
version: "3.8"

services:
# Postgres Database
Expand All @@ -12,7 +12,6 @@ services:
ports:
- "${DB_PORT}:${DB_PORT}"
volumes:
# - ./indexers/db/data/postgres:/var/lib/postgresql/data
- ./indexers/db/docker-entrypoint-initdb.d/init-db.sql:/docker-entrypoint-initdb.d/init-db.sql
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
Expand Down Expand Up @@ -228,4 +227,4 @@ services:
test: ["CMD", "curl", "-f", "http://staking-subquery-node:3000/ready"]
interval: 3s
timeout: 5s
retries: 10
retries: 10

0 comments on commit 0584eb7

Please sign in to comment.