-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
37 lines (37 loc) · 1018 Bytes
/
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
version: "3.4"
services:
db:
container_name: ca-microservices-app-db
image: postgres:latest
restart: always
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=changethis
- POSTGRES_DB=ca_microservices_nodejs
- POSTGRES_PORT=5432
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
- ./db_migrations/000001.sql:/docker-entrypoint-initdb.d/000001.sql
command: ["docker-entrypoint.sh", "postgres", "-c", "log_statement=all"]
express:
image: ca-microservices-nodejs:latest
container_name: ca-microservices-app
volumes:
- ./app:/usr/src/app
ports:
- "3001:3001"
environment:
- NODE_ENV=development
- PORT=3001
- SECRET_KEY=secret_key_value
- EXPIRES_IN=1h
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=changethis
- POSTGRES_HOST=db
- POSTGRES_DB=ca_microservices_nodejs
- POSTGRES_PORT=5432
restart: on-failure
volumes:
postgres_data: