Skip to content

Commit

Permalink
Fixes fonts for docker image
Browse files Browse the repository at this point in the history
  • Loading branch information
mrharpo committed Jul 20, 2023
1 parent c7a300e commit 99dc55b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
3 changes: 0 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
FROM python

WORKDIR /app
RUN pip3 install numpy
RUN mkdir -p data

COPY pyproject.toml README.md ./
Expand All @@ -11,7 +10,5 @@ RUN BEZIER_NO_EXTENSION=true pip3 install -e alfred/otto[render]
RUN pip3 install -e . uvicorn

RUN rm /etc/ImageMagick-6/policy.xml
COPY alfred/otto/fonts /usr/share/fonts/truetype
RUN fc-cache -f -v

CMD ["uvicorn", "alfred.main:app", "--host", "0.0.0.0", "--port", "80", "--reload"]
7 changes: 4 additions & 3 deletions dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,19 @@ services:
- 8000:80
volumes:
- ./alfred/otto:/otto/
- ./alfred/otto/fonts:/usr/share/fonts/truetype/

renderer:
build:
context: .
dockerfile: ./Dockerfile
image: alfred_worker
entrypoint: celery -A alfred.core.utils.tasks:renderer --workdir /app/ -b mongodb://db:27017/celery --result-backend mongodb://db:27017/celery worker --loglevel=info
entrypoint: celery -A alfred.core.utils.tasks:renderer --workdir /app/alfred -b mongodb://db:27017/celery --result-backend mongodb://db:27017/celery worker --loglevel=info
networks:
- alfred_isolated
volumes:
- ./alfred/:/app/
- ./alfred/otto:/otto/
- ./alfred/:/app/alfred/
- ./alfred/otto/fonts:/usr/share/fonts/truetype/
- ./cred.json:/cred.json
depends_on:
- 'db'
Expand Down

0 comments on commit 99dc55b

Please sign in to comment.