Skip to content

Commit 59484ca

Browse files
authored
Merge pull request #4 from sio2project/2-add-postgres-to-docker-compose-for-development
Add postgres do docker compose
2 parents 37e4932 + a9f55f9 commit 59484ca

File tree

3 files changed

+25
-5
lines changed

3 files changed

+25
-5
lines changed

.github/workflows/format.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ on:
33
push:
44
branches:
55
- main
6-
pull_request:
7-
branches:
8-
- main
6+
pull_request:
7+
branches:
8+
- main
99

1010
jobs:
1111
format:

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docker-compose.yml

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
version: '3.8'
22

3-
# MinIO setup for s3dedup
3+
# MinIO and PostgreSQL setup for s3dedup development
44
# Buckets are automatically created by the application on startup
55
services:
66
minio:
@@ -22,6 +22,26 @@ services:
2222
timeout: 20s
2323
retries: 3
2424

25+
postgres:
26+
image: postgres:16-alpine
27+
container_name: s3dedup-postgres
28+
restart: unless-stopped
29+
ports:
30+
- "5432:5432"
31+
environment:
32+
POSTGRES_USER: postgres
33+
POSTGRES_PASSWORD: postgres
34+
POSTGRES_DB: s3dedup
35+
volumes:
36+
- postgres_data:/var/lib/postgresql/data
37+
healthcheck:
38+
test: ["CMD-SHELL", "pg_isready -U postgres"]
39+
interval: 10s
40+
timeout: 5s
41+
retries: 5
42+
2543
volumes:
2644
minio_data:
45+
driver: local
46+
postgres_data:
2747
driver: local

0 commit comments

Comments
 (0)