2023-05-23 12:07:25 -07:00
|
|
|
FROM python:3.11-alpine
|
|
|
|
|
2023-05-23 13:27:25 -07:00
|
|
|
ENV DATABASE_PASSWORD ""
|
|
|
|
RUN if [ -z "${DATABASE_PASSWORD}" ]; then echo "ghostforge build error: Set DATABASE_PASSWORD in .env."; exit 1; fi
|
2023-05-23 17:14:49 -07:00
|
|
|
RUN if [ -z "${GHOSTFORGE_JWT_SECRET}" ]; then echo "ghostforge build error: Set GHOSTFORGE_JWT_SECRET in .env."; exit 1; fi
|
2023-05-23 13:27:25 -07:00
|
|
|
|
2023-05-23 12:07:25 -07:00
|
|
|
WORKDIR /ghostforge
|
|
|
|
COPY . .
|
|
|
|
RUN rm .env
|
2023-05-23 17:14:49 -07:00
|
|
|
RUN mkdir -p "${GHOSTFORGE_DATA_DIR}"
|
2023-05-23 12:07:25 -07:00
|
|
|
|
|
|
|
RUN pip install .
|
|
|
|
|
|
|
|
ENV GHOSTFORGE_INTERNAL_WEB_PORT=8080
|
|
|
|
ENV PYTHONPATH=/ghostforge/ghostforge
|
|
|
|
|
|
|
|
EXPOSE ${GHOSTFORGE_INTERNAL_WEB_PORT}
|
2023-05-23 14:33:32 -07:00
|
|
|
CMD [ "ghostforge_serve" ]
|