-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample_docker-compose.yml
More file actions
42 lines (40 loc) · 1.1 KB
/
example_docker-compose.yml
File metadata and controls
42 lines (40 loc) · 1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# Docker Compose 배포 모드 사용 시 참고할 예시 파일입니다.
# 이 파일을 docker-compose.yml로 복사하여 프로젝트에 맞게 수정하세요.
#
# .env 파일에 아래 변수들이 자동으로 설정됩니다:
# DOCKER_IMAGE, HOST_PORT, CONTAINER_PORT,
# HOST_MOUNT_PATH, CONTAINER_MOUNT_PATH
services:
app:
image: ${DOCKER_IMAGE}
restart: unless-stopped
ports:
- "${HOST_PORT}:${CONTAINER_PORT:-8000}"
volumes:
- ${HOST_MOUNT_PATH}:${CONTAINER_MOUNT_PATH}
env_file:
- .env
environment:
TZ: Asia/Seoul
logging:
driver: json-file
options:
max-size: "10m"
max-file: "3"
security_opt:
- no-new-privileges:true
cap_drop:
- ALL
# pids_limit: 512 # 필요 시 활성화
# mem_limit: 512m # 필요 시 활성화
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:${CONTAINER_PORT:-8000}/health || exit 1"]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
networks:
- app-network
networks:
app-network:
driver: bridge