-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
57 lines (57 loc) · 1.3 KB
/
docker-compose.yaml
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
57
services:
db:
image: postgres:15-alpine3.19
restart: always
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
ports:
- '5432:5432'
volumes:
- db:/var/lib/postgresql/data
- ./db/init.sql:/docker-entrypoint-initdb.d/create_tables.sql
cache:
image: redis:7.2.4-alpine3.19
restart: always
ports:
- '6379:6379'
command: redis-server --save 20 1 --loglevel warning --requirepass eYVX7EwVmmxKPCDmwMtyKVge8oLd2t81
volumes:
- cache:/data
api:
build:
context: ./
depends_on:
- db
- cache
ports:
- 8080:8080
environment:
REDIS_HOST: cache
REDIS_PORT: 6379
REDIS_PASSWORD: eYVX7EwVmmxKPCDmwMtyKVge8oLd2t81
CONNECTION_STRING: host=db port=5432 user=postgres dbname=labraboard password=postgres
links:
- db
- cache
handlers:
command: ./handlers
build:
context: ./
dockerfile: Dockerfile
depends_on:
- db
- cache
environment:
REDIS_HOST: cache
REDIS_PORT: 6379
REDIS_PASSWORD: eYVX7EwVmmxKPCDmwMtyKVge8oLd2t81
CONNECTION_STRING: host=db port=5432 user=postgres dbname=labraboard password=postgres
links:
- db
- cache
volumes:
db:
driver: local
cache:
driver: local