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

View file

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

View file

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

View file

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