[+] update docker for services

This commit is contained in:
Siarhei Siniak 2025-07-11 11:17:48 +03:00
parent 83a09207d6
commit ad7bff67c4
2 changed files with 33 additions and 7 deletions

@ -4,16 +4,13 @@ services:
ports:
- 127.0.0.1:9004:6379
web:
web: &web
image: online.fxreader.pr34.test_task_2025_06_30_v1:dev
build:
context: .
dockerfile: ./docker/web/Dockerfile
target: web
environment:
volumes:
- .:/app:ro
- ./tmp/cache:/app/tmp/cache:rw
logging:
driver: "json-file"
options:
@ -24,8 +21,21 @@ services:
limits:
cpus: '0.5'
memory: 128M
ports:
- 127.0.0.1:9003:80
web-dev:
<<: *web
volumes:
- .:/app:ro
- ./tmp/cache:/app/tmp/cache:rw
emcont_worker:
<<: *web
image: online.fxreader.pr34.test_task_2025_06_30_v1:dev
environment:
command:
- python3
- -m
- online.fxreader.pr34.test_task_2025_06_30_v1.async_api.app
postgresql:
image: docker.io/postgres:14.18-bookworm@sha256:c0aab7962b283cf24a0defa5d0d59777f5045a7be59905f21ba81a20b1a110c9

@ -30,5 +30,21 @@ RUN apt-get update -yy && apt-get install -yy tini
FROM base as web
RUN \
--mount=type=bind,source=releases/whl,target=/app/releases/whl \
--mount=type=cache,target=/root/.cache/pip \
--mount=type=cache,target=/root/.cache/uv \
uv pip \
install \
--system \
--break-system-packages \
--no-index \
-f releases/whl \
'online.fxreader.pr34.test_task_2025_06_30_v1==0.1'
ENTRYPOINT ["tini", "--"]
CMD ["/usr/bin/python3", "-m", "d1.reload"]
CMD [ \
"python3", \
"-m", \
"online.fxreader.pr34.test_task_2025_06_30_v1.async_api.app" \
]