forked from RJihyeon/SantaTellMe
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose-deploy.yml
46 lines (43 loc) · 1.2 KB
/
docker-compose-deploy.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
services:
santa-db:
image: mysql:8.4
environment:
MYSQL_DATABASE: test_db
#MYSQL_ALLOW_EMPTY_PASSWORD: yes
MYSQL_ROOT_PASSWORD: pass
MYSQL_USER: test_user
MYSQL_PASSWORD: pass
volumes:
- ./backend/data:/docker-entrypoint-initdb.d # create table when container starts
ports:
- 3306:3306
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]
interval: 2s
timeout: 2s
retries: 20
santa-server:
image: gitp/santa-server:0.0.1
build:
context: ./backend
ports:
- 8000:8000
depends_on:
santa-db:
condition: service_healthy
env_file:
- .env
environment:
REDIRECT_URI: "http://43.202.2.151:8000/authenticate" # override REDIRECT_URI in env_file
CONNECTION_URL: "mysql://test_user:pass@santa-db:3306/test_db" # override CONNECTION_URL in env_file
santa-front:
image: gitp/santa-front:0.0.1
build:
context: ./frontend
args:
NEXT_PUBLIC_API_BASE_URL: "http://santa-server:8000"
NEXT_PUBLIC_API_EXTERNAL_BASE_URL: "http://43.202.2.151:8000"
ports:
- 3000:3000
depends_on:
- santa-server