♻️ Add backend and frontend to docker-compose
This commit is contained in:
26
backend/Dockerfile
Normal file
26
backend/Dockerfile
Normal file
@@ -0,0 +1,26 @@
|
||||
FROM python:3.11-slim as builder
|
||||
|
||||
WORKDIR /app
|
||||
COPY . /app
|
||||
|
||||
RUN apt update && apt install -y proj-bin
|
||||
|
||||
RUN pip install --upgrade poetry && \
|
||||
poetry config virtualenvs.create false && \
|
||||
poetry install --only=main && \
|
||||
poetry export -f requirements.txt >> requirements.txt
|
||||
|
||||
FROM python:3.11-slim as runtime
|
||||
|
||||
COPY . /app
|
||||
COPY --from=builder /app/requirements.txt /app
|
||||
|
||||
RUN apt update && apt install -y postgresql libpq5
|
||||
RUN pip install --no-cache-dir -r /app/requirements.txt
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
ENV CONFIG_PATH=./config.sample.yaml
|
||||
ENV API_KEY=MwP7lbljnXIYAnmmmPRzasHsIknaiKqD
|
||||
|
||||
CMD ["python", "./main.py"]
|
Reference in New Issue
Block a user