Skip to content

Commit f463ad6

Browse files
committed
dockercompose: db and api dev
1 parent b2f2701 commit f463ad6

File tree

4 files changed

+86
-143
lines changed

4 files changed

+86
-143
lines changed

backend/spring-boot/docker-compose-api-dev.yml

Lines changed: 0 additions & 93 deletions
This file was deleted.
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
services:
2+
bugzkit-api:
3+
container_name: bugzkit-api
4+
image: bugzkit-api:dev
5+
build:
6+
target: dev
7+
ports:
8+
- "8080:8080"
9+
restart: always
10+
environment:
11+
UI_URL: ${UI_URL:-http://localhost:5173}
12+
POSTGRES_HOST: ${POSTGRES_HOST:-postgres}
13+
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-root}
14+
REDIS_HOST: ${REDIS_HOST:-redis}
15+
REDIS_PASSWORD: ${REDIS_PASSWORD:-root}
16+
USER_PASSWORD: ${USER_PASSWORD:-qwerty123}
17+
SMTP_PASSWORD: ${SMTP_PASSWORD:-password}
18+
JWT_SECRET: ${JWT_SECRET:-secret}
19+
depends_on:
20+
- postgres
21+
- redis
22+
healthcheck:
23+
test: ["CMD", "curl", "-f", "http://localhost:8080/actuator/health"]
24+
start_period: 10s
25+
interval: 30s
26+
retries: 3
27+
networks:
28+
- web
29+
30+
postgres:
31+
container_name: postgres
32+
image: postgres:17.2-alpine
33+
ports:
34+
- "5432:5432"
35+
environment:
36+
POSTGRES_DB: ${POSTGRES_DATABASE:-bugzkit}
37+
POSTGRES_USER: ${POSTGRES_USERNAME:-postgres}
38+
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-root}
39+
healthcheck:
40+
test: ["CMD", "pg_isready"]
41+
start_period: 10s
42+
interval: 30s
43+
retries: 3
44+
45+
redis:
46+
container_name: redis
47+
image: redis:7.4.1
48+
ports:
49+
- "6379:6379"
50+
command: redis-server --requirepass ${REDIS_PASSWORD:-root}
51+
environment:
52+
REDIS_PASSWORD: ${REDIS_PASSWORD:-root}
53+
healthcheck:
54+
test: ["CMD", "redis-cli", "-a", "${REDIS_PASSWORD:-root}", "ping"]
55+
start_period: 10s
56+
interval: 30s
57+
retries: 3

backend/spring-boot/docker-compose-db-dev.yml

Lines changed: 0 additions & 50 deletions
This file was deleted.
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
services:
2+
postgres:
3+
container_name: postgres
4+
image: postgres:17.2-alpine
5+
ports:
6+
- "5432:5432"
7+
environment:
8+
POSTGRES_DB: ${POSTGRES_DATABASE:-bugzkit}
9+
POSTGRES_USER: ${POSTGRES_USERNAME:-postgres}
10+
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-root}
11+
healthcheck:
12+
test: ["CMD", "pg_isready"]
13+
start_period: 10s
14+
interval: 30s
15+
retries: 3
16+
17+
redis:
18+
container_name: redis
19+
image: redis:7.4.1
20+
ports:
21+
- "6379:6379"
22+
command: redis-server --requirepass ${REDIS_PASSWORD:-root}
23+
environment:
24+
REDIS_PASSWORD: ${REDIS_PASSWORD:-root}
25+
healthcheck:
26+
test: ["CMD", "redis-cli", "-a", "${REDIS_PASSWORD:-root}", "ping"]
27+
start_period: 10s
28+
interval: 30s
29+
retries: 3

0 commit comments

Comments
 (0)