fix failing builds

This commit is contained in:
hay-kot 2021-03-20 13:27:03 -08:00
commit 3d0e38444e
4 changed files with 33 additions and 33 deletions

View file

@ -10,10 +10,11 @@ FROM python:3.9-alpine
RUN apk add --no-cache libxml2-dev libxslt-dev libxml2 caddy libffi-dev
ENV ENV prod
EXPOSE 80
WORKDIR /app
WORKDIR /app/
COPY ./pyproject.toml /app/
RUN apk add --update --no-cache --virtual .build-deps \
curl \
g++ \
@ -29,13 +30,12 @@ RUN apk add --update --no-cache --virtual .build-deps \
apk --purge del .build-deps
COPY ./mealie /app
COPY ./mealie /app/mealie
COPY ./Caddyfile /app
COPY ./app_data/templates /app/data/templates
RUN rm -rf /app/tests /app/.temp
COPY --from=build-stage /app/dist /app/dist
VOLUME [ "/app/data/" ]
RUN chmod +x /app/run.sh
CMD /app/run.sh
RUN chmod +x /app/mealie/run.sh
CMD /app/mealie/run.sh

View file

@ -1,21 +1,21 @@
FROM python:3
WORKDIR /app/
RUN apt-get update -y && \
apt-get install -y python-pip python-dev
# Install Poetry
RUN curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | POETRY_HOME=/opt/poetry python && \
cd /usr/local/bin && \
ln -s /opt/poetry/bin/poetry && \
poetry config virtualenvs.create false
# Copy poetry.lock* in case it doesn't exist in the repo
COPY ./pyproject.toml ./poetry.lock* /app/
WORKDIR /app
RUN poetry install
RUN poetry install --no-root
COPY ./mealie /app/mealie
COPY ./mealie /app
ENTRYPOINT [ "python" ]
CMD [ "app.py" ]
CMD ["uvicorn", "mealie.app:app", "--host", "0.0.0.0", "--port", "9000"]

View file

@ -2,19 +2,19 @@
version: "3.1"
services:
# Vue Frontend
mealie-frontend:
image: mealie-frontend:dev
build:
context: ./frontend
dockerfile: frontend.Dockerfile
restart: always
ports:
- 9920:8080
environment:
VUE_APP_API_BASE_URL: "http://mealie-api:9000"
volumes:
- ./frontend/:/app
- /app/node_modules
# mealie-frontend:
# image: mealie-frontend:dev
# build:
# context: ./frontend
# dockerfile: frontend.Dockerfile
# restart: always
# ports:
# - 9920:8080
# environment:
# VUE_APP_API_BASE_URL: "http://mealie-api:9000"
# volumes:
# - ./frontend/:/app
# - /app/node_modules
# Fast API
mealie-api:
@ -32,11 +32,11 @@ services:
- ./app_data:/app_data
- ./mealie:/app
mealie-docs:
image: squidfunk/mkdocs-material
restart: always
ports:
- 9922:8000
volumes:
- ./docs:/docs
# mealie-docs:
# image: squidfunk/mkdocs-material
# restart: always
# ports:
# - 9922:8000
# volumes:
# - ./docs:/docs

View file

@ -9,4 +9,4 @@
caddy start --config ./Caddyfile
## Start API
uvicorn app:app --host 0.0.0.0 --port 9000
uvicorn mealie.app:app --host 0.0.0.0 --port 9000