Skip to content

Commit

Permalink
Merging branch 'dev' into 'master' for 'release_3.0.3b'
Browse files Browse the repository at this point in the history
  • Loading branch information
felipebiox committed Dec 17, 2020
2 parents 972ea53 + 77170d3 commit 7892912
Show file tree
Hide file tree
Showing 57 changed files with 4,461 additions and 1,040 deletions.
50 changes: 29 additions & 21 deletions Dockerfile
@@ -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
96 changes: 20 additions & 76 deletions OmniDB/OmniDB-mac.spec
@@ -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)
4 changes: 2 additions & 2 deletions OmniDB/OmniDB/custom_settings.py
@@ -1,8 +1,8 @@
import os

# OmniDB settings
OMNIDB_VERSION = 'OmniDB 3.0.2b'
OMNIDB_SHORT_VERSION = '3.0.2b'
OMNIDB_VERSION = 'OmniDB 3.0.3b'
OMNIDB_SHORT_VERSION = '3.0.3b'
DEV_MODE = True
DESKTOP_MODE = False
APP_TOKEN = None
Expand Down

0 comments on commit 7892912

Please sign in to comment.