The backend app of Project Amber, a task list app
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

26 lines
771 B

  1. FROM python:3.8-alpine
  2. LABEL maintainer "Timur Demin <me@tdem.in>"
  3. WORKDIR /app
  4. ENV UWSGI_PORT 8080
  5. ENV UWSGI_PROCESSES 1
  6. ENV UWSGI_THREADS 2
  7. COPY requirements.txt setup.py setup.cfg /app/
  8. COPY bin /app/bin
  9. COPY --chown=0:0 doc/config.json.example /etc/amber.json
  10. # we do not remove postgresql-dev after installation, as psycopg2 needs libpq
  11. # present on the system
  12. RUN adduser -D -u 1000 amber && \
  13. mkdir -p /data && chown amber /data && chmod 700 /data && \
  14. apk add --no-cache build-base libffi-dev postgresql-dev && \
  15. pip install -r requirements.txt && \
  16. pip install uwsgi psycopg2 && \
  17. apk del build-base libffi-dev && \
  18. chmod +x /app/bin/run_uwsgi.sh
  19. COPY project_amber /app/project_amber
  20. USER amber
  21. CMD [ "sh", "/app/bin/run_uwsgi.sh" ]