-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose-dev.yml
More file actions
143 lines (137 loc) · 4.13 KB
/
docker-compose-dev.yml
File metadata and controls
143 lines (137 loc) · 4.13 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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
services:
########################################## mapctf-api ############################################
mapctf-api:
container_name: 'mapctf-api-dev'
image: 'mapctf-api-dev:${MAPCTF_VERSION}'
restart: unless-stopped
build:
context: .
dockerfile: deploy/docker/dockerfiles/Dockerfile-dev-api
args:
GOLANG_VERSION: ${GOLANG_VERSION}
environment:
# mapctf-api configuration settings
- SERVICE_LISTENER=0.0.0.0
- SERVICE_PORT=8081
- SERVICE_LOG_FORMAT=console
# Database settings
- DB_HOST=mapctf-postgres
- DB_NAME=${POSTGRES_DB_NAME}
- DB_PORT=${POSTGRES_DB_PORT}
- DB_USER=${POSTGRES_DB_USERNAME}
- DB_PASS=${POSTGRES_DB_PASSWORD}
#### Redis settings ####
- REDIS_HOST=mapctf-redis
- REDIS_PORT=${REDIS_PORT}
# MapCTF settings
- MAPCTF_USERNAME=${MAPCTF_USERNAME}
- MAPCTF_PASSWORD=${MAPCTF_PASSWORD}
networks:
- mapctf-dev-backend
ports:
- 127.0.0.1:8081:8081
volumes:
- .:/usr/src/app:rw,delegated
depends_on:
- mapctf-postgres
- mapctf-redis
########################################## mapctf-map ############################################
mapctf-map:
container_name: 'mapctf-map-dev'
image: 'mapctf-map-dev:${MAPCTF_VERSION}'
restart: unless-stopped
build:
context: .
dockerfile: deploy/docker/dockerfiles/Dockerfile-dev-map
args:
GOLANG_VERSION: ${GOLANG_VERSION}
environment:
# mapctf-map configuration settings
- SERVICE_LISTENER=0.0.0.0
- SERVICE_PORT=8082
- SERVICE_LOG_FORMAT=console
# Database settings
- DB_HOST=mapctf-postgres
- DB_NAME=${POSTGRES_DB_NAME}
- DB_PORT=${POSTGRES_DB_PORT}
- DB_USER=${POSTGRES_DB_USERNAME}
- DB_PASS=${POSTGRES_DB_PASSWORD}
#### Redis settings ####
- REDIS_HOST=mapctf-redis
- REDIS_PORT=${REDIS_PORT}
# MapCTF settings
- MAPCTF_USERNAME=${MAPCTF_USERNAME}
- MAPCTF_PASSWORD=${MAPCTF_PASSWORD}
- MAP_UUID=${MAP_UUID}
networks:
- mapctf-dev-backend
ports:
- 127.0.0.1:8082:8082
volumes:
- .:/usr/src/app:rw,delegated
depends_on:
- mapctf-postgres
- mapctf-redis
########################################## mapctf-ui #############################################
# mapctf-ui:
# container_name: 'mapctf-ui-dev'
# image: 'mapctf-ui-dev:${MAPCTF_VERSION}'
# restart: unless-stopped
# build:
# context: .
# dockerfile: deploy/docker/dockerfiles/Dockerfile-dev-frontend
# args:
# NODE_VERSION: ${NODE_VERSION:-18}
# environment:
# # Frontend configuration settings
# - VITE_API_URL=http://127.0.0.1:8081
# networks:
# - mapctf-dev-backend
# ports:
# - 127.0.0.1:3000:3000
# volumes:
# - ./frontend:/app:rw,delegated
# - /app/node_modules
# depends_on:
# - mapctf-api
########################################### PostgreSQL ###########################################
mapctf-postgres:
container_name: 'mapctf-postgres-dev'
image: postgres:${POSTGRES_VERSION}
restart: unless-stopped
environment:
- POSTGRES_DB=${POSTGRES_DB_NAME}
- POSTGRES_USER=${POSTGRES_DB_USERNAME}
- POSTGRES_PASSWORD=${POSTGRES_DB_PASSWORD}
networks:
- mapctf-dev-backend
ports:
- 127.0.0.1:5432:5432
volumes:
- postgres-dev-db:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "sh -c 'pg_isready -U ${POSTGRES_DB_USERNAME} -d ${POSTGRES_DB_NAME}'"]
interval: 10s
timeout: 5s
retries: 5
######################################### Redis #########################################
mapctf-redis:
container_name: 'mapctf-redis-dev'
image: redis:${REDIS_VERSION}
restart: unless-stopped
networks:
- mapctf-dev-backend
ports:
- 127.0.0.1:6379:6379
volumes:
- redis-dev-data:/data
healthcheck:
test: ["CMD", "redis-cli","ping"]
interval: 10s
timeout: 5s
retries: 5
networks:
mapctf-dev-backend:
volumes:
postgres-dev-db:
redis-dev-data: