Skip to content

Commit dc903eb

Browse files
committed
feat: 로컬 용 컴포즈 구성
1 parent a22ffb7 commit dc903eb

File tree

1 file changed

+59
-0
lines changed

1 file changed

+59
-0
lines changed

compose.local.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
version: "3.8"
2+
3+
services:
4+
postgres:
5+
image: postgres:16-alpine
6+
environment:
7+
POSTGRES_USER: ${DB_USER}
8+
POSTGRES_PASSWORD: ${DB_PASSWORD}
9+
POSTGRES_DB: ${DB_NAME}
10+
volumes:
11+
- postgres_data:/var/lib/postgresql/data
12+
networks:
13+
- backend
14+
healthcheck:
15+
test: ["CMD-SHELL", "pg_isready -U ${DB_USER} -d ${DB_NAME}"]
16+
interval: 10s
17+
timeout: 5s
18+
retries: 5
19+
20+
backend:
21+
build:
22+
context: .
23+
dockerfile: ./services/backend/Dockerfile.local
24+
image: backend:latest
25+
env_file:
26+
- .env
27+
depends_on:
28+
postgres:
29+
condition: service_healthy
30+
networks:
31+
- backend
32+
- frontend
33+
34+
nginx:
35+
build:
36+
context: .
37+
dockerfile: ./services/nginx/Dockerfile.local
38+
ports:
39+
- "80:80"
40+
- "443:443"
41+
depends_on:
42+
- backend
43+
networks:
44+
- frontend
45+
volumes:
46+
- type: bind
47+
source: ./services/nginx/ssl
48+
target: /etc/nginx/ssl
49+
bind:
50+
create_host_path: true
51+
propagation: rprivate
52+
53+
networks:
54+
backend:
55+
internal: true
56+
frontend:
57+
58+
volumes:
59+
postgres_data:

0 commit comments

Comments
 (0)