-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
45 lines (39 loc) · 953 Bytes
/
docker-compose.yaml
File metadata and controls
45 lines (39 loc) · 953 Bytes
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
# Base configuration
# use docker-compose.override.yaml for local overrides
# The .env file contains the variables referenced such aus ${DATABASE_URL}
services:
frontend:
build:
context: ./
dockerfile: ./Dockerfile
environment:
DATABASE_HOST: advice_app_db
ports:
- 3000:3000
networks:
- advice-network
depends_on:
- advice_app_db
advice_app_db:
image: postgres:alpine
restart: always
# set shared memory limit when using docker-compose
shm_size: 128mb
environment:
POSTGRES_PASSWORD_FILE: /run/secrets/db-pass
POSTGRES_USER: admin
POSTGRES_DB: advice_app_db
secrets:
- db-pass
networks:
- advice-network
volumes:
- db-data:/var/lib/postgresql/data
# Define secrets in the override file for your system, e.g.:
# secrets:
# db-pass:
# file: docker/secrets/db-pass.txt
volumes:
db-data:
networks:
advice-network: