Skip to content

Commit

Permalink
Make sure the nightly docker image consists out of the latest master …
Browse files Browse the repository at this point in the history
…branch of the repo instead of the pypi version of PyPlanet
  • Loading branch information
tomvlk committed Aug 30, 2023
1 parent 869738c commit a0f07f6
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/docker-publish-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
uses: docker/build-push-action@v4
with:
context: .
file: ./Dockerfile
file: ./NightlyDockerfile
push: true
platforms: linux/amd64, linux/arm64, linux/arm64/v8
tags: pyplanet/pyplanet:nightly
36 changes: 36 additions & 0 deletions NightlyDockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
FROM python:3.8
LABEL maintainer="Tom Valk <tomvalk@lt-box.info>"
ENV PROJECT_ROOT /app
ENV IS_DOCKER 1

# Create maniaplanet user/group
RUN addgroup --gid 1000 maniaplanet && \
adduser -u 1000 --group maniaplanet --system

RUN apt-get -q update \
&& apt-get install -y build-essential libssl-dev libffi-dev zlib1g-dev \
&& rm -rf /var/lib/apt/lists/*

# Create project root.
RUN mkdir -p $PROJECT_ROOT
WORKDIR $PROJECT_ROOT
COPY docs/docker/root/base.py $PROJECT_ROOT/base.py
RUN chown -R maniaplanet:maniaplanet $PROJECT_ROOT

# Copy current project files.
COPY . /pyplanet

# Install PyPlanet.
RUN pip install -e /pyplanet

USER maniaplanet

# Init project.
RUN pyplanet init_project server
WORKDIR $PROJECT_ROOT/server/
RUN cp ../base.py $PROJECT_ROOT/server/settings/base.py

VOLUME $PROJECT_ROOT/server/

ENTRYPOINT [ "python3", "manage.py" ]
CMD [ "start", "--pool=default", "--settings=settings" ]

0 comments on commit a0f07f6

Please sign in to comment.