Rework so that dockerized deployments can self-configure
This commit is contained in:
parent
2ade04ae7b
commit
35a37aab8a
4 changed files with 51 additions and 46 deletions
projects/activitypub_relay
|
@ -8,15 +8,18 @@ RUN mkdir -p /app
|
|||
RUN chown -R app:app /app
|
||||
USER app
|
||||
WORKDIR /app
|
||||
ENV PATH="/app/.local/bin:${PATH}"
|
||||
ENV PYTHONPATH="/app:${PYTHONPATH}"
|
||||
# Trivialize detecting dockerization
|
||||
VOLUME /data
|
||||
ENV DOCKER_RUNNING=true
|
||||
|
||||
ENV PYTHONPATH="/app:${PYTHONPATH}"
|
||||
ENV PATH="/app/.local/bin:${PATH}"
|
||||
|
||||
### App specific crap
|
||||
# Deps vary least so do them first
|
||||
RUN pip3 install --user install aiohttp aiohttp_basicauth async_lru cachetools click pycryptodome pyyaml retry
|
||||
|
||||
COPY --chown=app:app src/python relay.yaml relay.jsonld /app/
|
||||
COPY --chown=app:app docker_relay.sh /app/relay.sh
|
||||
COPY --chown=app:app src/python /app/
|
||||
|
||||
CMD ["python3", "relay/__main__.py", "-c", "relay.yaml", "run"]
|
||||
EXPOSE 8080
|
||||
ENTRYPOINT ["/bin/sh", "/app/relay.sh"]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue