forked from parth23-dev/jury
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose-mongo.dev.yml
80 lines (76 loc) · 2.2 KB
/
docker-compose-mongo.dev.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
version: '3.9'
services:
mongo:
build:
context: './'
dockerfile: mongo.Dockerfile
restart: always
environment:
- MONGO_INITDB_ROOT_USERNAME=${MONGODB_USER}
- MONGO_INITDB_ROOT_PASSWORD=${MONGODB_PASS}
- MONGO_INITDB_DATABASE=jury
- MONGO_REPLICA_SET_NAME=rs0
ports:
- 27017:27017
volumes:
- './data:/data/db'
networks:
- jury-dev-network
mongorssetup:
depends_on:
- 'mongo'
image: mongo:latest
environment:
- MONGODB_USER=${MONGODB_USER}
- MONGODB_PASS=${MONGODB_PASS}
volumes:
- .:/scripts
restart: "no"
entrypoint: [ 'bash', '/scripts/init-mongo-rs.sh' ]
networks:
- jury-dev-network
go-dev:
depends_on:
- 'mongo'
- 'mongorssetup'
container_name: jury-dev-backend
environment:
- MONGODB_URI=mongodb://${MONGODB_USER}:${MONGODB_PASS}@mongo:27017/
- JURY_ADMIN_PASSWORD=${JURY_ADMIN_PASSWORD}
- EMAIL_HOST=${EMAIL_HOST}
- EMAIL_PORT=${EMAIL_PORT}
- EMAIL_FROM=${EMAIL_FROM}
- EMAIL_FROM_NAME=${EMAIL_FROM_NAME}
- EMAIL_USERNAME=${EMAIL_USERNAME}
- EMAIL_PASSWORD=${EMAIL_PASSWORD}
- SENDGRID_API_KEY=${SENDGRID_API_KEY}
- VITE_JURY_NAME=${JURY_NAME}
- PORT=8000
build:
context: './'
dockerfile: dev.Dockerfile
ports:
- ${PORT:-8000}:8000
volumes:
- ./server:/jury
networks:
- jury-dev-network
node-dev:
depends_on:
- 'go-dev'
container_name: jury-dev-frontend
environment:
- VITE_JURY_NAME=${JURY_NAME}
- VITE_JURY_URL=http://localhost:${PORT:-8000}/api
build:
context: './'
dockerfile: client/dev.Dockerfile
ports:
- 3000:3000
volumes:
- ./client:/client
networks:
- jury-dev-network
networks:
jury-dev-network:
driver: bridge