Compare commits
No commits in common. "e32310da73c64575609e1b76e8f4b4ec8f8698b5" and "a30bef03fa1741204baab1d7d9f55766047f22bf" have entirely different histories.
e32310da73
...
a30bef03fa
3 changed files with 4 additions and 41 deletions
35
Dockerfile
35
Dockerfile
|
@ -1,35 +0,0 @@
|
||||||
FROM python:3.11-slim as python-base
|
|
||||||
ENV PYTHONUNBUFFERED=1 \
|
|
||||||
PYTHONDONTWRITEBYTECODE=1 \
|
|
||||||
POETRY_HOME="/opt/poetry" \
|
|
||||||
POETRY_VIRTUALENVS_IN_PROJECT=true \
|
|
||||||
POETRY_NO_INTERACTION=1 \
|
|
||||||
PYSETUP_PATH="/opt/venv" \
|
|
||||||
VENV_PATH="/opt/venv/.venv"
|
|
||||||
ENV PATH="$POETRY_HOME/bin:$VENV_PATH/bin:$PATH"
|
|
||||||
|
|
||||||
FROM python-base as builder-base
|
|
||||||
RUN apt-get update && \
|
|
||||||
apt-get install -y --no-install-recommends \
|
|
||||||
curl build-essential gcc libffi-dev libssl-dev \
|
|
||||||
libxml2-dev libxslt1-dev zlib1g-dev libxslt-dev \
|
|
||||||
gcc libjpeg-dev zlib1g-dev libwebp-dev
|
|
||||||
|
|
||||||
RUN curl -sSL https://install.python-poetry.org | python3 -
|
|
||||||
WORKDIR $PYSETUP_PATH
|
|
||||||
COPY poetry.lock pyproject.toml ./
|
|
||||||
RUN poetry install
|
|
||||||
|
|
||||||
FROM python-base as production
|
|
||||||
RUN apt-get update && \
|
|
||||||
apt-get install -y --no-install-recommends \
|
|
||||||
libjpeg-dev libxslt1-dev libxml2-dev libxslt-dev
|
|
||||||
COPY --from=builder-base /opt /opt
|
|
||||||
COPY . /app/
|
|
||||||
RUN groupadd --gid 1000 foxhole \
|
|
||||||
&& useradd --uid 1000 --gid foxhole --shell /bin/bash foxhole
|
|
||||||
RUN chown -R 1000:1000 /app
|
|
||||||
USER foxhole
|
|
||||||
WORKDIR /app
|
|
||||||
EXPOSE 7000
|
|
||||||
CMD ["./misc/start.sh"]
|
|
|
@ -59,11 +59,11 @@ ME = {
|
||||||
"sharedInbox": config.BASE_URL
|
"sharedInbox": config.BASE_URL
|
||||||
+ "/inbox",
|
+ "/inbox",
|
||||||
},
|
},
|
||||||
"url": config.ID + "/", # the path is important for Mastodon compat
|
"url": config.ID + "/", # XXX: the path is important for Mastodon compat
|
||||||
"manuallyApprovesFollowers": config.CONFIG.manually_approves_followers,
|
"manuallyApprovesFollowers": config.CONFIG.manually_approves_followers,
|
||||||
"attachment": [], # TODO media support
|
"attachment": [], # TODO
|
||||||
"icon": {
|
"icon": {
|
||||||
"mediaType": "image/png", # TODO media support
|
"mediaType": "image/png", # TODO
|
||||||
"type": "Image",
|
"type": "Image",
|
||||||
"url": config.CONFIG.icon_url,
|
"url": config.CONFIG.icon_url,
|
||||||
},
|
},
|
||||||
|
@ -72,7 +72,7 @@ ME = {
|
||||||
"owner": config.ID,
|
"owner": config.ID,
|
||||||
"publicKeyPem": get_pubkey_as_pem(config.KEY_PATH),
|
"publicKeyPem": get_pubkey_as_pem(config.KEY_PATH),
|
||||||
},
|
},
|
||||||
"tag": [] # TODO tag support
|
"tag": [] # TODO
|
||||||
}
|
}
|
||||||
|
|
||||||
class VisibilityEnum(str, enum.Enum):
|
class VisibilityEnum(str, enum.Enum):
|
||||||
|
|
|
@ -1,2 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
uvicorn app.main:app --port 7000
|
|
Loading…
Reference in a new issue