-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
88 lines (86 loc) · 1.88 KB
/
docker-compose.yaml
File metadata and controls
88 lines (86 loc) · 1.88 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
version: "3.8"
services:
#####################
### Dev Container ###
#####################
oven:
container_name: oven
profiles:
- tools
build:
context: .dev-container
hostname: oven #optional
volumes:
- ./:/home/vs-code/duck-checkers
networks:
- duck-net
ports:
- 22222:22222
- 5173:5173
restart: unless-stopped
command: sleep infinity
#############
### MONGO ###
#############
mongo:
image: mongo:5.0.15
container_name: mongodb
profiles:
- product
tty: true
restart: always
environment:
- MONGO_INITDB_ROOT_USERNAME=${MONGO_USERNAME}
- MONGO_INITDB_ROOT_PASSWORD=${MONGO_PASSWORD}
- MONGO_DATABASE_NAME=${MONGO_DATABASE}
volumes:
- ./mongoSeed/init:/docker-entrypoint-initdb.d
- ./mongo/init/data:/tmp/data
- ./mongo/data:/data/db
ports:
- ${MONGO_PORT}:27017
networks:
- duck-net
healthcheck:
test: echo 'db.runCommand({serverStatus:1}).ok' | mongo admin -u ${MONGO_USERNAME} -p ${MONGO_PASSWORD} --quiet | grep 1
interval: 20s
timeout: 30s
retries: 5
start_period: 120s
#############
#### API ####
#############
api:
restart: 'no'
container_name: duck-api
build:
context: server
target: base
env_file:
- .env
ports:
- ${SERVER_PORT:-22222}:22222
networks:
- duck-net
#############
#### APP ####
#############
app:
restart: 'no'
container_name: duck-app
build:
context: client
target: base
environment:
- PUBLIC_SERVER_PORT=${SERVER_PORT}
- PUBLIC_SERVER_URL=${SERVER_URL}
ports:
- 4173:4173
networks:
- duck-net
###########
### NET ###
###########
networks:
duck-net:
driver: "bridge"