-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
54 lines (50 loc) · 1.38 KB
/
docker-compose.yml
File metadata and controls
54 lines (50 loc) · 1.38 KB
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
# version: "3.8"
#Services
services:
server:
build:
context: ./backend
dockerfile: Dockerfile
container_name: backend
ports:
- "5000:5000"
env_file: ./.env
environment:
- NODE_ENV="development"
- PORT=5000
- DB_HOST=mongodb
- DB_USER=$MONGODB_USER
- DB_PASSWORD=$MONGODB_PASSWORD
- DB_NAME=$MONGODB_DATABASE
- DB_PORT=$MONGODB_DOCKER_PORT
- CLOUD_NAME=$CLOUD_NAME
- API_KEY=$API_KEY
- API_SECRET=$API_SECRET
- JWT_SECRET=$JWT_SECRET
depends_on:
- mongodb
mongodb:
image: mongo:7.0
container_name: mongodb_server
env_file: ./.env
environment:
- MONGO_INITDB_ROOT_USERNAME=$MONGODB_USER
- MONGO_INITDB_ROOT_PASSWORD=$MONGODB_PASSWORD
ports:
- "27017:27017"
volumes:
- ./mydata:/data/db
- ./mongo.init.js:/docker-entrypoint-initdb.d/mongo.init.js
client:
build:
context: ./frontend
args:
- VITE_PUBLIC_API_BASE_URL=http://localhost:5000/api
dockerfile: Dockerfile
container_name: frontend
ports:
- "5173:5173"
depends_on:
- server
volumes:
mydata: