-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.yaml
More file actions
64 lines (62 loc) · 1.28 KB
/
Copy pathcompose.yaml
File metadata and controls
64 lines (62 loc) · 1.28 KB
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
58
59
60
61
62
63
64
services:
web:
build: .
networks:
- shortener
hostname: web
depends_on:
- postgres
- redis
volumes:
- ./shortener_flask_app:/python_docker/shortener_flask_app
- ./uv.lock:/python_docker/uv.lock
- ./pyproject.toml:/python_docker/pyproject.toml
env_file:
- web.env
entrypoint:
- /bin/bash
command:
- -c
- |
uv sync &&\
cd ./shortener_flask_app &&\
uv run gunicorn -c gunicorn_cfg.py "factory:app_builder(behind_proxy=True)"
postgres:
image: postgres:14-alpine
networks:
- shortener
hostname: db
restart: always
env_file:
- db.env
volumes:
- db:/data/postgres
redis:
image: redis:8.4.0-alpine
networks:
- shortener
hostname: cache
env_file:
- cache.env
restart: always
command: |
redis-server --requirepass $$REDIS_ROOT_PASSWORD
environment:
ALLOW_EMPTY_PASSWORD: ${REDIS_ALLOW_EMPTY_PASSWORD:-no}
proxy:
image: nginx:stable-alpine3.23
networks:
- shortener
restart: always
hostname: proxy
ports:
- "8088:80"
volumes:
- ./nginx.conf:/etc/nginx/conf.d/default.conf
depends_on:
- web
volumes:
db:
networks:
shortener:
driver: bridge