-
Notifications
You must be signed in to change notification settings - Fork 17
/
docker-compose.yml
51 lines (48 loc) · 1.17 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
version: "3"
services:
app:
image: dm_app_image
container_name: dm_app
build:
context: .
dockerfile: ./Dockerfile
env_file: .env
ports:
- "3000:3000"
environment:
POSTGRES_URL: postgresql://digmkt:digmkt@db:5432/digmkt
NODE_ENV: ${NODE_ENV}
depends_on:
- db
db:
container_name: dm_db
image: postgres:12
volumes:
- dm-vol:/var/lib/postgresql/data
- ./:/workspace
restart: always
ports:
- "5432:5432"
environment:
POSTGRES_USER: digmkt
POSTGRES_PASSWORD: digmkt
POSTGRES_DB: digmkt
command: ["postgres", "-c", "log_statement=all"]
test-db:
container_name: ${CONTAINER_NAME:-dm_test_db}
image: postgres:12
volumes:
- ./sql/create_test_schema.sql:/docker-entrypoint-initdb.d/create_test_schema.sql
- dm-test-vol:/var/lib/postgresql/data
restart: always
ports:
- "${DB_PORT:-5433}:5432"
environment:
POSTGRES_USER: digmkt-test
POSTGRES_PASSWORD: digmkt-test
POSTGRES_DB: digmkt-test
command: ["postgres", "-c", "search_path=digmkt-test,digmkt-test"]
volumes:
dm-vol:
dm-test-vol:
cypress-vol: