-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yml
88 lines (87 loc) · 2.26 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
86
87
services:
frontend:
container_name: unboxed_frontend
hostname: unboxed_frontend
domainname: unboxed_frontend.local
build:
context: ./frontend
dockerfile: ./docker/Dockerfile.build
volumes:
- /usr/src/app/node_modules
- ./frontend:/usr/src/app
ports:
- 5001:5001
environment:
- PORT=5001
- REACT_APP_PUBLISHABLE_API_KEY=$MAGIC_LINK_PUBLISHABLE_API_KEY
- REACT_APP_LOCATION_ID=$SQUARE_LOCATION_ID
depends_on:
- database
- backend
networks:
- unboxed
database:
container_name: unboxed_database
hostname: unboxed_database
domainname: unboxed_database.local
image: mongo
# command: mongod --auth
volumes:
- ./database:/data/db
# - ./init-mongo.js:/docker-entrypoint-initdb.d/mongo-init.js:ro
ports:
- 27017-27019:27017-27019
environment:
- MONGO_INITDB_DATABASE=$MONGODB_DATABASE
- MONGO_INITDB_ROOT_USERNAME=$MONGODB_USER
- MONGO_INITDB_ROOT_PASSWORD=$MONGODB_PASSWORD
networks:
- unboxed
backend:
container_name: unboxed_backend
hostname: unboxed_backend
domainname: unboxed_backend.local
build:
context: ./backend
dockerfile: ./docker/Dockerfile.build
volumes:
- /usr/src/app/node_modules
- ./backend:/usr/src/app
ports:
- 8000:8000
environment:
- MAGIC_LINK_SECRET_KEY=$MAGIC_LINK_SECRET_KEY
- SQUARE_SIGNATURE_KEY=$SQUARE_SIGNATURE_KEY
- SERVER_PORT=$SERVER_PORT
- SQUARE_ENVIRONMENT=$SQUARE_ENVIRONMENT
- SQUARE_ACCESS_TOKEN=$SQUARE_ACCESS_TOKEN
- SQUARE_LOCATION_ID=$SQUARE_LOCATION_ID
- SQUARE_API_VERSION=$SQUARE_API_VERSION
- MONGODB_HOST=$MONGODB_HOST
- MONGODB_USER=$MONGODB_USER
- MONGODB_PASSWORD=$MONGODB_PASSWORD
- MONGODB_DATABASE=$MONGODB_DATABASE
- MONGODB_PORT=$MONGODB_PORT
depends_on:
- database
networks:
- unboxed
# stdin_open: true
# tty: true
nginx:
container_name: unboxed_nginx
hostname: unboxed_nginx
domainname: unboxed_nginx.local
build:
context: ./infra
dockerfile: ./Dockerfile
ports:
- 80:80
networks:
- unboxed
volumes:
database:
driver: local
networks:
unboxed:
driver: bridge