-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
41 lines (37 loc) · 953 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
version: '3.8'
services:
api:
container_name: MiniBlog
build: .
volumes:
- .:/app
ports:
- '5000:5000'
environment:
- FLASK_APP=app
- ADMIN_API_KEY=ef0daece340363c97a2a7b3958fcbbb7 # openssl rand -hex 16
- SECRET_KEY=99791f4a4fc7dfef9848780c5594ee05 # openssl rand -hex 16
- JWT_SECRET_KEY=1ecc82705a0f96fedcc79bea672aa34b # openssl rand -hex 16
- DATABASE_URL=postgresql://miniblog:miniblog@db/miniblog # SQLALCHEMY URI
- REDIS_URL=redis://cache:6379/0
depends_on:
- db
- cache
db:
image: postgres:16-alpine
container_name: Postgres
environment:
POSTGRES_DB: miniblog
POSTGRES_USER: miniblog
POSTGRES_PASSWORD: miniblog
ports:
- '5432:5432'
volumes:
- postgres-data:/var/lib/postgresql/data
cache:
image: redis:6.2-alpine
container_name: Redis
ports:
- '6379:6379'
volumes:
postgres-data: