-
Notifications
You must be signed in to change notification settings - Fork 139
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Working Docker setup with python3 (#684)
* Docker changes * working changes * update noauth.py * Docker setup * changing passwrod * Revert "changing passwrod" This reverts commit 62cd1dd. * Healthcheck & Freshping addition * removing mysql password * config changes
- Loading branch information
1 parent
7a72bcc
commit 3c8ffac
Showing
17 changed files
with
21,334 additions
and
8 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
FROM ubuntu:20.04 | ||
ENV DEBIAN_FRONTEND noninteractive | ||
|
||
RUN apt-get update && apt-get -y dist-upgrade \ | ||
&& apt-get -y install libffi-dev libsasl2-dev python3-dev libyaml-dev sudo \ | ||
libldap2-dev libssl-dev python3-pip python3-setuptools python3-venv \ | ||
mysql-client nginx uwsgi uwsgi-plugin-python3 uwsgi-plugin-gevent-python3 \ | ||
&& pip3 install mysql-connector-python \ | ||
&& rm -rf /var/cache/apt/archives/* | ||
|
||
RUN useradd -m -s /bin/bash iris | ||
|
||
COPY src /home/iris/source/src | ||
COPY setup.py /home/iris/source/setup.py | ||
COPY MANIFEST.in /home/iris/source/MANIFEST.in | ||
COPY README.md /home/iris/source/README.md | ||
|
||
WORKDIR /home/iris | ||
|
||
RUN chown -R iris:iris /home/iris/source /var/log/nginx /var/lib/nginx \ | ||
&& sudo -Hu iris mkdir -p /home/iris/var/log/uwsgi /home/iris/var/log/nginx /home/iris/var/run /home/iris/var/relay \ | ||
&& sudo -Hu iris python3 -m venv /home/iris/env \ | ||
&& sudo -Hu iris /bin/bash -c 'source /home/iris/env/bin/activate && python3 -m pip install -U pip wheel && cd /home/iris/source && pip install .' | ||
|
||
COPY . /home/iris | ||
COPY ops/config/systemd /etc/systemd/system | ||
COPY ops/daemons /home/iris/daemons | ||
COPY ops/daemons/uwsgi-docker.yaml /home/iris/daemons/uwsgi.yaml | ||
COPY db /home/iris/db | ||
COPY configs /home/iris/config | ||
COPY healthcheck /tmp/status | ||
COPY ops/entrypoint.py /home/iris/entrypoint.py | ||
|
||
RUN chown -R iris:iris /home/iris/ | ||
|
||
EXPOSE 16649 | ||
|
||
CMD ["sudo", "-EHu", "iris", "bash", "-c", "source /home/iris/env/bin/activate && python -u /home/iris/entrypoint.py"] |
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,16 @@ | ||
version: '3' | ||
|
||
services: | ||
iris-web: | ||
build: . | ||
ports: | ||
- "16649:16649" | ||
environment: | ||
- DOCKER_DB_BOOTSTRAP=1 | ||
volumes: | ||
- ./configs/config.dev.yaml:/home/iris/config/config.yaml | ||
|
||
iris-mysql: | ||
image: mysql:5.5 | ||
environment: | ||
- MYSQL_ROOT_PASSWORD=1234 |
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 @@ | ||
GOOD |
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
Oops, something went wrong.