-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
50 lines (46 loc) · 1.01 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
version: "3.9"
services:
redis:
image: redis:7.0-alpine
container_name: expenses-redis
restart: always
ports:
- 6379:6379
command: redis-server --save 20 1 --loglevel warning
volumes:
- ./.redis:/data
postgres:
image: postgres:14-alpine
container_name: expenses-postgres
environment:
POSTGRES_PASSWORD: postgres
POSTGRES_DB: expenses
volumes:
- ./.postgres:/var/lib/postgresql/data
ports:
- 5432:5432
mongo:
image: mongo:7.0-rc
restart: unless-stopped
container_name: expenses-mongo
ports:
- 27017:27017
volumes:
- ./.mongo:/data/db
environment:
- MONGO_INITDB_ROOT_USERNAME=mongo
- MONGO_INITDB_ROOT_PASSWORD=mongo
expenses:
image: node:18-alpine
container_name: expenses-backend
working_dir: /app
env_file: ./.env
volumes:
- .:/app
ports:
- $PORT:$PORT
depends_on:
- postgres
- redis
- mongo
command: sh -c "yarn install && yarn dev"