Added missing dev functionalities for Docker files from dev branch
This commit is contained in:
17
Dockerfile
17
Dockerfile
@ -1,5 +1,18 @@
|
|||||||
FROM python:3.11.7-slim-bookworm
|
FROM python:3.11.7-alpine
|
||||||
|
|
||||||
|
# Wersja i data builda jako build-arg
|
||||||
|
ARG APP_VERSION=unknown
|
||||||
|
ARG BUILD_DATE=unknown
|
||||||
|
|
||||||
|
# Ustawiamy zmienne w ENV, by były dostępne w kontenerze
|
||||||
|
ENV APP_VERSION=$APP_VERSION
|
||||||
|
ENV BUILD_DATE=$BUILD_DATE
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
COPY api .
|
COPY api .
|
||||||
|
|
||||||
|
RUN apk add --no-cache curl
|
||||||
RUN pip install -r requirements.txt
|
RUN pip install -r requirements.txt
|
||||||
CMD python3 app.py
|
|
||||||
|
CMD python3 app.py
|
@ -7,9 +7,24 @@ services:
|
|||||||
build: .
|
build: .
|
||||||
env_file:
|
env_file:
|
||||||
- api/.env
|
- api/.env
|
||||||
|
ports:
|
||||||
|
- 80:80
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD", "curl", "-f", "http://localhost/health"]
|
||||||
|
interval: 10s
|
||||||
|
timeout: 5s
|
||||||
|
retries: 5
|
||||||
|
start_period: 15s
|
||||||
db:
|
db:
|
||||||
container_name: db
|
container_name: db
|
||||||
hostname: db
|
hostname: db
|
||||||
image: mysql:latest
|
image: mysql:latest
|
||||||
env_file:
|
env_file:
|
||||||
- db/.env
|
- db/.env
|
||||||
|
ports:
|
||||||
|
- 3306:3306
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]
|
||||||
|
interval: 10s
|
||||||
|
timeout: 5s
|
||||||
|
retries: 5
|
Reference in New Issue
Block a user