-
-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make sure the nightly docker image consists out of the latest master …
…branch of the repo instead of the pypi version of PyPlanet
- Loading branch information
Showing
2 changed files
with
37 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" ] |