forked from OmniDB/OmniDB
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merging branch 'dev' into 'master' for 'release_3.0.3b'
- Loading branch information
Showing
57 changed files
with
4,461 additions
and
1,040 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 |
---|---|---|
@@ -1,28 +1,36 @@ | ||
FROM debian:stable-slim | ||
FROM python:latest | ||
|
||
ENV OMNIDB_VERSION=2.17.0 | ||
ENV SERVICE_USER=omnidb | ||
LABEL maintainer="OmniDB team" | ||
|
||
WORKDIR /${SERVICE_USER} | ||
ARG OMNIDB_VERSION=3.0.3b | ||
|
||
RUN adduser --system --home /${SERVICE_USER} --no-create-home ${SERVICE_USER} \ | ||
&& mkdir -p /${SERVICE_USER} \ | ||
&& chown -R ${SERVICE_USER}.root /${SERVICE_USER} \ | ||
&& chmod -R g+w /${SERVICE_USER} \ | ||
&& apt-get update \ | ||
&& apt-get -y upgrade \ | ||
&& apt-get install -y wget dumb-init \ | ||
&& if [ ! -e '/bin/systemctl' ]; then ln -s /bin/echo /bin/systemctl; fi \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
SHELL ["/bin/bash", "-c"] | ||
|
||
RUN wget -q https://omnidb.org/dist/${OMNIDB_VERSION}/omnidb-server_${OMNIDB_VERSION}-debian-amd64.deb \ | ||
&& dpkg -i omnidb-server_${OMNIDB_VERSION}-debian-amd64.deb \ | ||
&& rm -rf omnidb-server_${OMNIDB_VERSION}-debian-amd64.deb | ||
USER root | ||
|
||
RUN addgroup --system omnidb \ | ||
&& adduser --system omnidb --ingroup omnidb \ | ||
&& apt-get update \ | ||
&& apt-get install libsasl2-dev python-dev libldap2-dev libssl-dev vim -y | ||
|
||
USER omnidb:omnidb | ||
ENV HOME /home/omnidb | ||
WORKDIR ${HOME} | ||
|
||
RUN wget https://github.com/OmniDB/OmniDB/archive/${OMNIDB_VERSION}.tar.gz \ | ||
&& tar -xvzf ${OMNIDB_VERSION}.tar.gz \ | ||
&& mv OmniDB-${OMNIDB_VERSION} OmniDB | ||
|
||
WORKDIR ${HOME}/OmniDB | ||
|
||
RUN pip install -r requirements.txt | ||
|
||
WORKDIR ${HOME}/OmniDB/OmniDB | ||
|
||
RUN sed -i "s/LISTENING_ADDRESS = '127.0.0.1'/LISTENING_ADDRESS = '0.0.0.0'/g" config.py \ | ||
&& python omnidb-server.py --init \ | ||
&& python omnidb-server.py --dropuser=admin | ||
|
||
USER ${SERVICE_USER} | ||
|
||
EXPOSE 8000 | ||
EXPOSE 25482 | ||
|
||
ENTRYPOINT [ "/usr/bin/dumb-init", "--" ] | ||
CMD ["omnidb-server", "-H", "0.0.0.0"] | ||
CMD python omnidb-server.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,102 +1,46 @@ | ||
# -*- mode: python -*- | ||
# -*- mode: python ; coding: utf-8 -*- | ||
|
||
block_cipher = None | ||
|
||
data_files = [ | ||
('db.sqlite3','.'), | ||
('omnidb.conf','.'), | ||
data_files_server = [ | ||
('omnidb.db','.'), | ||
('config.py','.'), | ||
('OmniDB_app/static','OmniDB_app/static'), | ||
('OmniDB_app/include','OmniDB_app/include'), | ||
('OmniDB_app/templates','OmniDB_app/templates'), | ||
('OmniDB/migrations','OmniDB/migrations') | ||
('OmniDB_app/plugins','OmniDB_app/plugins') | ||
] | ||
|
||
a = Analysis(['omnidb-app.py'], | ||
|
||
a = Analysis(['omnidb-server.py'], | ||
pathex=['C:\\Users\\omnidb\\OmniDB\\OmniDB\\OmniDB'], | ||
binaries=[], | ||
datas=data_files, | ||
hiddenimports=[], | ||
datas=data_files_server, | ||
hiddenimports=['cheroot.ssl','cheroot.ssl.builtin','psycopg2','paramiko'], | ||
hookspath=[], | ||
runtime_hooks=[], | ||
excludes=[], | ||
win_no_prefer_redirects=False, | ||
win_private_assemblies=False, | ||
cipher=block_cipher, | ||
noarchive=False) | ||
pyz = PYZ(a.pure, a.zipped_data, | ||
cipher=block_cipher) | ||
pyz_a = PYZ(a.pure, a.zipped_data, | ||
cipher=block_cipher) | ||
exe_a = EXE(pyz_a, | ||
exe = EXE(pyz, | ||
a.scripts, | ||
[], | ||
exclude_binaries=True, | ||
name='omnidb-app', | ||
name='omnidb-server', | ||
debug=False, | ||
bootloader_ignore_signals=False, | ||
strip=False, | ||
upx=True, | ||
console=False, | ||
icon='icons/win-icon.ico' ) | ||
coll_a = COLLECT(exe_a, | ||
console=True ) | ||
coll = COLLECT(exe, | ||
a.binaries, | ||
a.zipfiles, | ||
a.datas, | ||
strip=False, | ||
upx=True, | ||
name='omnidb-app') | ||
|
||
b = Analysis(['omnidb-server.py'], | ||
binaries=[], | ||
datas=data_files, | ||
hiddenimports=['cheroot.ssl','cheroot.ssl.builtin'], | ||
hookspath=[], | ||
runtime_hooks=[], | ||
excludes=[], | ||
win_no_prefer_redirects=False, | ||
win_private_assemblies=False, | ||
cipher=block_cipher) | ||
pyz_b = PYZ(b.pure, b.zipped_data, | ||
cipher=block_cipher) | ||
exe_b = EXE(pyz_b, | ||
b.scripts, | ||
exclude_binaries=True, | ||
name='omnidb-server', | ||
debug=False, | ||
strip=False, | ||
upx=True, | ||
console=True ) | ||
coll_b = COLLECT(exe_b, | ||
b.binaries, | ||
b.zipfiles, | ||
b.datas, | ||
strip=False, | ||
upx=True, | ||
upx_exclude=[], | ||
name='omnidb-server') | ||
|
||
c = Analysis(['omnidb-config.py'], | ||
binaries=[], | ||
datas=[], | ||
hiddenimports=[], | ||
hookspath=[], | ||
runtime_hooks=[], | ||
excludes=[], | ||
win_no_prefer_redirects=False, | ||
win_private_assemblies=False, | ||
cipher=block_cipher) | ||
pyz_c = PYZ(c.pure, c.zipped_data, | ||
cipher=block_cipher) | ||
exe_c = EXE(pyz_c, | ||
c.scripts, | ||
exclude_binaries=True, | ||
name='omnidb-config', | ||
debug=False, | ||
strip=False, | ||
upx=True, | ||
console=True ) | ||
coll_c = COLLECT(exe_c, | ||
c.binaries, | ||
c.zipfiles, | ||
c.datas, | ||
strip=False, | ||
upx=True, | ||
name='omnidb-config') | ||
|
||
app = BUNDLE(exe_a, | ||
name='OmniDB.app', | ||
icon='deploy/mac-icon.icns', | ||
bundle_identifier=None) |
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.