-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
executable file
·60 lines (55 loc) · 1.39 KB
/
docker-compose.yml
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
version: "3.8"
services:
minio:
image: minio/minio:latest
volumes:
- data:/data
expose:
- "9000"
- "9001"
environment:
MINIO_ROOT_USER: ${MINIO_ROOT_USER}
MINIO_ROOT_PASSWORD: ${MINIO_ROOT_PASSWORD}
command: server --console-address :9001 /data
healthcheck:
test: ["CMD", "curl", "-f", "http://minio:9000/minio/health/live"]
interval: 1m30s
timeout: 20s
retries: 3
start_period: 3m
restart: unless-stopped
server:
build:
context: .
target: development # specify target stage in Dockerfile
dockerfile: ./Dockerfile
container_name: file-upload-server
restart: unless-stopped
environment:
# passing env to container
- SERVER_PORT=${SERVER_PORT}
ports:
# map host port to container port
- ${SERVER_PORT}:${SERVER_PORT}
volumes:
- ./src:/usr/src/server/src # map directory to container for hot reloading
- /usr/src/node_modules # map node_modules directory
nginx:
image: nginx:1.19.2-alpine
hostname: nginx
volumes:
# map configuration file
- ./nginx.conf:/etc/nginx/nginx.conf:ro
ports:
- "9000:9000"
- "9001:9001"
depends_on:
- minio
healthcheck:
test: ["CMD", "service", "nginx", "status"]
interval: 1m30s
timeout: 20s
retries: 3
start_period: 3m
volumes:
data: