social media crossposting tool. 3rd time's the charm
mastodon
misskey
crossposting
bluesky
1FROM python:3.12-alpine
2COPY --from=ghcr.io/astral-sh/uv:0.7.12 /uv /uvx /bin/
3
4# Install build tools & runtime dependencies
5RUN apk add --no-cache \
6 ffmpeg \
7 file \
8 libmagic
9
10RUN mkdir -p /app/data
11WORKDIR /app
12
13# switch to a non-root user
14RUN adduser -D -u 1000 app && \
15 chown -R app:app /app
16USER app
17
18# Enable bytecode compilation
19ENV UV_COMPILE_BYTECODE=1
20
21# Copy from the cache instead of linking since it's a mounted volume
22ENV UV_LINK_MODE=copy
23
24# Define app data volume
25VOLUME /app/data
26
27# Then, add the rest of the project source code and install it
28COPY --chown=app:app . /app
29RUN uv sync --locked --no-group dev
30
31# Place executables in the environment at the front of the path
32ENV PATH="/app/.venv/bin:$PATH"
33
34# Set entrypoint to run the app using uv
35ENTRYPOINT ["python", "main.py"]