-
Notifications
You must be signed in to change notification settings - Fork 5
/
docker-compose.yml
85 lines (82 loc) · 2.76 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
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
version: "3.7" # version of docker-compose file
services:
# ganache-cli: simulated test rpc on dev environment
# ganache-cli:
# container_name: ganache-cli
# image: trufflesuite/ganache-cli:latest
# ports:
# - "7545:8545"
# db:
# image: mongo
# volumes:
# - "/.docker/data/mongod.conf:/etc/mongod.conf"
# - "mongo_data:/data/db"
# ports:
# - "37017:27017"
# restart: unless-stopped
back_end:
container_name: back_end
image: duyquoc/land_trade_backend:0.0.1
build: ./server
ports:
- "${PUBLIC_PORT}:${PORT}" # mapping port from physical to container
restart: unless-stopped # auto restart
# depends_on:
# - db
# - ganache-cli
volumes:
- "./server:/app"
environment:
PORT: ${PORT}
NODE_ENV: ${NODE_ENV}
SECRET_KEY: ${SECRET_KEY}
ACCESS_TOKEN_SECRET: ${ACCESS_TOKEN_SECRET}
REFRESH_TOKEN_SECRET: ${REFRESH_TOKEN_SECRET}
ACCESS_TOKEN_LIFE: ${ACCESS_TOKEN_LIFE}
REFRESH_TOKEN_LIFE: ${REFRESH_TOKEN_LIFE}
USERNAME_EMAIL: ${USERNAME_EMAIL}
PASSWORD_EMAIL: ${PASSWORD_EMAIL}
WEBSOCKET_PROVIDER: ${WEBSOCKET_PROVIDER}
REACT_APP_BASE_URL: ${REACT_APP_BASE_URL}
COIN_MARKET_API_KEY: ${COIN_MARKET_API_KEY}
DB_HOST: ${DB_HOST}
DB_PORT: ${DB_PORT}
DB_NAME: ${DB_NAME}
FRONT_END_PORT: ${FRONT_END_PORT}
FRONT_END_DOMAIN: ${FRONT_END_DOMAIN}
front_end:
image: duyquoc/land_trade_frontend:0.0.1
container_name: front_end
build:
context: ./client
args:
REACT_APP_BASE_URL_API: ${REACT_APP_BASE_URL_API}
REACT_APP_PORT: ${REACT_APP_PORT}
REACT_APP_BASE_URL: ${REACT_APP_BASE_URL}
REACT_APP_BASE_URL_IMAGE: ${REACT_APP_BASE_URL_IMAGE}
REACT_APP_BASE_URL_ASSETS: ${REACT_APP_BASE_URL_ASSETS}
REACT_APP_BASE_URL_SOCKET: ${REACT_APP_BASE_URL_SOCKET}
REACT_APP_WEB3_PROVIDER: ${REACT_APP_WEB3_PROVIDER}
ports:
- "${REACT_APP_PORT}:${REACT_APP_PORT}" # mapping port from physical to container
# restart: unless-stopped # auto restart
depends_on:
- back_end
volumes:
- "./client:/app"
environment:
PORT: ${REACT_APP_PORT}
# env_file: ./.env
# REACT_APP_BASE_URL_API: ${REACT_APP_BASE_URL_API}
# REACT_APP_PORT: ${REACT_APP_PORT}
# REACT_APP_BASE_URL: ${REACT_APP_BASE_URL}
# REACT_APP_BASE_URL_IMAGE: ${REACT_APP_BASE_URL_IMAGE}
# REACT_APP_BASE_URL_ASSETS: ${REACT_APP_BASE_URL_ASSETS}
# REACT_APP_BASE_URL_SOCKET: ${REACT_APP_BASE_URL_SOCKET}
# REACT_APP_WEB3_PROVIDER: ${REACT_APP_WEB3_PROVIDER}
# REACT_APP_WEB3_PROVIDER_GETH: ${REACT_APP_WEB3_PROVIDER_GETH}
networks:
default:
driver: overlay #same network => allow access to all
volumes:
mongo_data: