-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
44 lines (42 loc) · 1.11 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
version: '3.8'
services:
server:
container_name: server
build:
context: ./server
# target: development
volumes:
- ./server/src:/usr/src/app/src
- /usr/src/app/node_modules # isolate container's node_modules from local node_modules (different OS versions)
ports:
- ${SERVER_PORT}:${SERVER_PORT}
# command: npm run test:unit
# command: npm run test:integration
command: npm run start:dev
env_file:
- .env
depends_on:
- db
- redis
db:
container_name: postgres
image: postgres:13.1
environment:
POSTGRES_DB: ${DB_DATABASE_NAME}
POSTGRES_USER: ${DB_USERNAME}
POSTGRES_PASSWORD: ${DB_PASSWORD}
PG_DATA: /var/lib/postgresql/data
volumes:
- data:/var/lib/postgresql/data
ports:
- ${DB_PORT}:${DB_PORT}
redis:
container_name: cache
image: redis
command: redis-server --requirepass ${CACHE_PASSWORD}
ports:
- ${CACHE_PORT}:${CACHE_PORT}
environment:
- REDIS_DISABLE_COMMANDS=FLUSHDB,FLUSHALL,CONFIG
volumes: #isolate DB data from potentially different OS
data: