-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
54 lines (51 loc) · 1.43 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
services:
redis-service:
image: redis:latest
container_name: redis_container
volumes:
- redis-data:/data
ports:
- 6379:6379
healthcheck:
test: ["CMD-SHELL", "redis-cli ping | grep PONG"]
interval: 1s
timeout: 3s
retries: 5
command: ["redis-server"]
restart: always
backend:
build: ./backend
container_name: employee_manager_backend_container
ports:
- 4000:4000
volumes:
- ./backend:/app
- /app/node_modules
environment:
- SERVER_PORT=4000
- JWT_SECRET=eyJhbGciOiJIUzI1NiJ9.eyJSb2xlIjoiQWRtaW4iLCJJc3N1ZXIiOiJJc3N1ZXIiLCJVc2VybmFtZSI6IkphdmFJblVzZSIsImV4cCI6MTcyOTYyMzc1NywiaWF0IjoxNzI5NjIzNzU3fQ.c6_mZDBpdVvDcxIQlC9RkJDV9NmVv8Y7pywkNVxsEkE
- MONGO_BASE_URL=mongodb+srv://{{{username}}}:{{{password}}}@cluster0.xfvev.mongodb.net/{{{database_name}}}
- MONGO_USERNAME=root
- MONGO_PASSWORD=h4fa6Jg9IPuqZMAj
- MONGO_DATABASE_NAME=employee_manager_v1
- REDIS_URL=redis://redis-service:6379
depends_on:
redis-service:
condition: service_healthy
frontend:
build: ./frontend
container_name: employee_manager_frontend_container
ports:
- 3000:3000
stdin_open: true
tty: true
volumes:
- ./frontend:/app
- /app/node_modules
environment:
- BACKEND_URL=http://localhost:4000
depends_on:
- backend
volumes:
redis-data:
driver: local