2
0
mirror of https://expo.survex.com/repositories/troggle/.git synced 2025-12-17 11:07:19 +00:00
Files
troggle/Containerfile

46 lines
1.3 KiB
Docker

# Containerfile originally created by MS Copilot 1st July 2025
# hand edited Philip Sargent
# move this to the directory above troggle, loser etc before running it.
#
FROM ghcr.io/astral-sh/uv:python3.13-bookworm
WORKDIR /EXPO
USER root
RUN apt update && \
apt-get install sqlite3 survex rsync -y && \
useradd -m expopod -G sudo -s /bin/bash
# Copy only the dependency files first
COPY troggle/pyproject.toml troggle/uv.lock ./troggle/
COPY expofiles/surveyscans/2018 /EXPO/expofiles/surveyscans/2018
COPY expofiles/photos/2018/PhilipSargent/ /EXPO/expofiles/photos/2018/PhilipSargent
COPY troggle /EXPO/troggle
COPY expoweb /EXPO/expoweb
COPY loser /EXPO/loser
COPY drawings /EXPO/drawings
RUN chown -R expopod:expopod .
USER expopod
# Install dependencies and Django
RUN cd troggle && uv sync --frozen
RUN git config --global user.email "expopod@potato.hut"
RUN git config --global user.name "expopod"
RUN git config --global pull.rebase true
RUN cd troggle && uv run databaseReset.py reset INIT
EXPOSE 8080
CMD ["uv", "run", "python", "troggle/manage.py", "runserver", "0.0.0.0:8080"]
CMD ["bash"]
# move this file to the directory above troggle, loser etc before running the podman image build command.
# if this was used like this:
# podman image build . --tag expo-01
# run this image interactively with
# podman run -it --network=host --rm expo-01