-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
50 lines (45 loc) · 960 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
38
39
40
41
42
43
44
45
46
47
48
49
50
version: "3.8"
services:
api:
build:
context: .
dockerfile: ./compose/local/Dockerfile
command: bash -c "
cd src/
&& alembic upgrade head
&& uvicorn main:app --host 0.0.0.0 --port 8000 --reload"
volumes:
- ./src:/app/src
env_file:
- compose/local/.env
secrets:
- api_jwt_private_key
- api_jwt_public_key
ports:
- 8000:8000
depends_on:
- pg
redis:
image: redis:7-alpine
command: redis-server --appendonly yes --requirepass pass
ports:
- 6379:6380
pg:
image: postgres:14-alpine
volumes:
- pg_data:/var/lib/postgresql/data/
environment:
- POSTGRES_USER=user
- POSTGRES_PASSWORD=pass
- POSTGRES_DB=database
expose:
- 5432
ports:
- 5433:5432
secrets:
api_jwt_private_key:
file: ./jwtRSA256-private.pem
api_jwt_public_key:
file: ./jwtRSA256-public.pem
volumes:
pg_data: