-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
76 lines (71 loc) · 1.58 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
services:
api:
build:
context: ./server
dockerfile: Dockerfile
container_name: sunoai-contests-api
environment:
- PORT=5000
- ENV=PRODUCTION
- MONGODB_URL=mongodb://mongodb:27017/
- MONGODB_DB=sunoai-contests
- CORS_ORIGIN_URL=http://localhost:3000
- ADMIN_USERNAME=admin
- ADMIN_PASSWORD=admin
ports:
- "5000:5000"
depends_on:
- mongodb
networks:
- database
- backend
gui:
build:
context: ./client
dockerfile: Dockerfile
args:
- REACT_APP_API_URL=http://localhost:5000
- REACT_APP_HOST=http://localhost:3000
- SERVER_NAME=localhost
container_name: sunoai-contests-gui
ports:
- "3000:80"
stdin_open: true
networks:
- backend
mongodb:
image: mongo
container_name: sunoai-contests-mongodb
ports:
- "27017:27017"
volumes:
- mongodb_data:/mongodb
networks:
- database
# PRODUCTION-ONLY
# reverse-proxy:
# image: valian/docker-nginx-auto-ssl:1.0.0
# container_name: sunoai-contests-reverse-proxy
# restart: on-failure
# ports:
# - "80:80"
# - "443:443"
# volumes:
# - ./.ssl-data:/etc/resty-auto-ssl
# environment:
# - ALLOWED_DOMAINS="(app|admin).localhost"
# - SITES="app.localhost=gui:3000;admin.localhost=api:5000"
# - FORCE_HTTPS="true"
# depends_on:
# - api
# - gui
# networks:
# - backend
volumes:
mongodb_data:
.ssl-data:
networks:
database:
driver: bridge
backend:
name: backend