-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
56 lines (52 loc) · 1.2 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
52
53
54
55
56
services:
database:
container_name: word_search_db
image: postgres
restart: always
# set shared memory limit when using docker-compose
shm_size: 128mb
# or set shared memory limit when deploy via swarm stack
#volumes:
# - type: tmpfs
# target: /dev/shm
# tmpfs:
# size: 134217728 # 128*2^20 bytes = 128Mb
environment:
POSTGRES_USER_FILE: /run/secrets/postgres-u
POSTGRES_PASSWORD_FILE: /run/secrets/postgres-p
POSTGRES_DB: wordsearch
volumes:
- word_search_db_data:/var/lib/postgresql/data
ports:
- 3535:5432
secrets:
- postgres-u
- postgres-p
networks:
- backend
api:
restart: always
container_name: word_search_api
image: wordsearchbattle-api:2.20
build:
dockerfile: WordSearchBattleAPI/Dockerfile
context: .
ports:
- 2943:8080
secrets:
- postgres-u
- postgres-p
- jwt-key
networks:
- backend
secrets:
postgres-u:
file: /var/secrets/postgres-u.txt
postgres-p:
file: /var/secrets/postgres-p.txt
jwt-key:
file: /var/secrets/jwt-key.txt
volumes:
word_search_db_data:
networks:
backend: