Skip to content

Commit

Permalink
docker-compose-db
Browse files Browse the repository at this point in the history
  • Loading branch information
while1618 committed Dec 22, 2024
1 parent ff57891 commit d1e59c4
Showing 1 changed file with 50 additions and 0 deletions.
50 changes: 50 additions & 0 deletions backend/spring-boot/docker-compose-db.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
services:
postgres:
container_name: postgres
image: postgres:17.2-alpine
ports:
- "${POSTGRES_PORT:-5432}:${POSTGRES_PORT:-5432}"
environment:
PGPORT: ${POSTGRES_PORT:-5432}
POSTGRES_DB: ${POSTGRES_DATABASE:-bootstrapbugz}
POSTGRES_USER: ${POSTGRES_USERNAME:-postgres}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-root}
healthcheck:
test:
[
"CMD",
"pg_isready",
"-U",
"${POSTGRES_USERNAME:-postgres}",
"-d",
"${POSTGRES_DATABASE:-bootstrapbugz}",
]
start_period: 10s
interval: 30s
retries: 3

redis:
container_name: redis
image: redis:7.4.1
ports:
- "${REDIS_PORT:-6379}:${REDIS_PORT:-6379}"
command: redis-server --port ${REDIS_PORT:-6379} --requirepass ${REDIS_PASSWORD:-root}
environment:
REDIS_DATABASE: ${REDIS_DATABASE:-0}
REDIS_PASSWORD: ${REDIS_PASSWORD:-root}
healthcheck:
test:
[
"CMD",
"redis-cli",
"-h",
"localhost",
"-p",
"${REDIS_PORT:-6379}",
"-a",
"${REDIS_PASSWORD:-root}",
"ping",
]
start_period: 10s
interval: 30s
retries: 3

0 comments on commit d1e59c4

Please sign in to comment.