summaryrefslogtreecommitdiffstats
path: root/docker
diff options
context:
space:
mode:
authorHolger Cremer <HolgerCremer@gmail.com>2018-08-27 19:38:11 +0200
committerHolger Cremer <HolgerCremer@gmail.com>2018-08-27 19:38:11 +0200
commit8f2ba2050ee78d0e4a47f1277c6bc4422d06170c (patch)
treec008d2878905e03df7a8bf8bd3330762cc2d8f43 /docker
parentbb55e121576a5b5d225bfc68c5062f386cc32db9 (diff)
parent3fc3ea6c6df237dbdf48d14703118b747bf5d647 (diff)
downloadserial-barcode-scanner-8f2ba2050ee78d0e4a47f1277c6bc4422d06170c.tar.bz2
Merge branch 'master' into better_inventory
Conflicts: README data/templates/products/entry.html docker/Dockerfile docker/init.sh src/database/database.vala src/database/db-interface.vala src/pdf-stock/Makefile src/pdf-stock/pdf-stock-interface.vala src/pdf-stock/pdf-stock.vala src/web/Makefile src/web/main.vala templates/menu.html templates/products/index.html
Diffstat (limited to 'docker')
-rw-r--r--docker/Dockerfile33
-rw-r--r--docker/README.md9
-rw-r--r--docker/config.ini44
-rwxr-xr-xdocker/init.sh12
-rw-r--r--docker/tmux-config11
5 files changed, 80 insertions, 29 deletions
diff --git a/docker/Dockerfile b/docker/Dockerfile
index e75667f..c73cf1e 100644
--- a/docker/Dockerfile
+++ b/docker/Dockerfile
@@ -1,45 +1,52 @@
-FROM debian:jessie
+FROM debian:testing
-RUN set -ex && \
- apt-get update && apt-get install -y --no-install-recommends \
- ca-certificates \
- curl \
- wget \
+ENV DEBIAN_FRONTEND noninteractive
+
+RUN apt-get update && apt-get install -y --no-install-recommends \
+ ca-certificates \
+ curl \
+ wget \
build-essential \
valac \
libesmtp-dev \
libgpgme11-dev \
libncursesw5-dev \
libncurses5-dev \
- libgee-dev \
libgmime-2.6-dev \
libarchive-dev \
libgstreamer1.0-dev \
- gstreamer1.0-alsa \
rygel-playbin \
librsvg2-dev \
libsqlite3-dev \
libpango1.0-dev \
libssl-dev \
+ meson \
dbus-x11 \
fonts-lmodern \
sqlite3 \
libgtk2.0-dev \
libsoup2.4-dev \
libgee-0.8-dev \
+ debhelper \
+ dh-sysuser \
+ libgmime-3.0-dev \
+ udev \
tmux \
- mdbus2 \
- && rm -rf /var/lib/apt/lists/*
+ # neeed for apt install shopsystem
+ systemd console-setup console-setup-linux dbconfig-common dbconfig-sqlite3 gstreamer1.0-alsa gstreamer1.0-plugins-base iso-codes kbd keyboard-configuration libasound2 libasound2-data libcdparanoia0 \
+ libgstreamer-plugins-base1.0-0 libjs-bootstrap libjs-c3 libjs-d3 libjs-jquery libjs-jquery-datatables libjs-jquery-flot libjs-jquery-mousewheel liblocale-gettext-perl libogg0 libopus0 liborc-0.4-0 \
+ libpam-systemd libpolkit-agent-1-0 libpolkit-backend-1-0 libpolkit-gobject-1-0 libtheora0 libvisual-0.4-0 libvorbis0a libvorbisenc2 policykit-1 systemd-sysv sysuser-helper xkb-data \
+ && rm -rf /var/lib/apt/lists/*
- RUN set -ex && \
+RUN set -ex && \
useradd shop && \
mkdir /var/run/dbus
ENV SBC_DIR /mnt/serial-barcode-scanner
+WORKDIR $SBC_DIR
COPY tmux-config /root/.tmux.conf
COPY init.sh /root/
-
-WORKDIR $SBC_DIR
+COPY config.ini /root/
ENTRYPOINT ["/root/init.sh"]
diff --git a/docker/README.md b/docker/README.md
index 065bacf..ac22919 100644
--- a/docker/README.md
+++ b/docker/README.md
@@ -7,7 +7,7 @@ docker build -t sbs-build .
# Config
-Change (or create) the `ktt-shopsystem.cfg` file that everything lays in `/mnt/serial-barcode-scanner` (change every folder...).
+Change the `config.ini` file that everything lays in `/mnt/serial-barcode-scanner` (change every folder...).
# Usage
@@ -20,7 +20,6 @@ cd ..
docker run --rm -it -p 8080:8080 -v "$PWD":/mnt/serial-barcode-scanner sbs-build
```
-You have now a tmux terminal to work with the vala files and run the program. E.g.
-- `cd src && make` to make the whole project
-- `cd src/curses-ui/ && ./curses-ui` to start the curses ui.
-- ...
+You have now a tmux terminal to work with the vala files and run the program.
+
+You can now start the single binaries in "obj-x..../src/" dir. \ No newline at end of file
diff --git a/docker/config.ini b/docker/config.ini
new file mode 100644
index 0000000..17e88ba
--- /dev/null
+++ b/docker/config.ini
@@ -0,0 +1,44 @@
+[GENERAL]
+longname = Kreativität trifft Technik e.V.
+shortname = KTT
+spacename = Mainframe
+datapath = /usr/share/shopsystem/
+[DATABASE]
+#file = /var/lib/shopsystem/shopsystem.db
+file = /mnt/serial-barcode-scanner/dev-shop.db
+[INPUT]
+# use ignore if you have no device (this skips the input feature)
+#barcodescanner = /dev/barcodescanner
+barcodescanner = ignore
+; rfidreader = /dev/rfidreader
+rfidreader = ignore
+[MAIL]
+# You can specify username + password, but it is recommended to use
+# a local mailserver (e.g. postfix or exim4) as relay server, that
+# queues your mails and will resend them if there is a temporary
+# network outage
+server = 127.0.0.1
+port = 25
+starttls = false
+mailfromaddress = shop@kreativitaet-trifft-technik.de
+treasurermailaddress = shop-einzug@kreativitaet-trifft-technik.de
+[PGP]
+keyring = /path/to/keyring/
+keyid = 0x12345678
+[WEB]
+# You can enable TLS, but it is recommended to use a reverse proxy
+# (e.g. nginx, lighttpd or apache) instead.
+port = 8080
+[INVOICE]
+vat = no
+addressrow = Kreativität trifft Technik e.V., Bahnhofsplatz 10, 26122 Oldenburg
+footer1 = <b>Kreativität trifft Technik e.V.</b>\nAmtsgericht Oldenburg VR 201044\n\nHackspace „Mainframe“\nFabLab „Fab-O-Lab“\nSchnittstelle „Schnittstelle“\n\nBahnhofsplatz 10 • 26122 Oldenburg
+footer2 = <b>Raiffeisenbank Oldenburg</b>\nIBAN: DE34 2806 0228 0037 0185 00\nBIC: GENODEF1OL2\n\n\n<b>Finanzamt Oldenburg</b>\nAls gemeinnützig anerkannt.\nSteuer Nr.: 64/220/18413
+footer3 = <b>Mail:</b> vorstand@kreativitaet-trifft-technik.de\n<b>Web:</b> www.kreativitaet-trifft-technik.de\n\n\n\n<b>BGB-Vorstand:</b>\nPatrick Günther, Jan Janssen, Andre Schäfer, Lars Hüsemann
+[JVEREIN]
+membership_number = intern
+[MQTT]
+broker = spacegate.mainframe.lan
+topic = /access-control-system/space-state
+displayOn = open
+displayOff = close
diff --git a/docker/init.sh b/docker/init.sh
index 49a3aa1..bcd6f6b 100755
--- a/docker/init.sh
+++ b/docker/init.sh
@@ -1,13 +1,9 @@
#!/bin/bash
-cd dbus
-make install
-cd config
-make install
-
export LD_LIBRARY_PATH=/mnt/serial-barcode-scanner/libcairobarcode
-cd ../..
dbus-daemon --system
-echo "Ready!"
-tmux
+dpkg-buildpackage -b -nc && \
+ apt install -y --no-install-recommends ./../shopsystem_*_amd64.deb && \
+ cp /root/config.ini /etc/shopsystem/config.ini && \
+ tmux
diff --git a/docker/tmux-config b/docker/tmux-config
index f70a089..0fd3635 100644
--- a/docker/tmux-config
+++ b/docker/tmux-config
@@ -3,11 +3,17 @@ set -g prefix C-a
unbind C-b
bind C-a send-prefix
+# reload ~/.tmux.conf using PREFIX r
+bind r source-file ~/.tmux.conf \; display "Reloaded!"
+
# scroll mode with s
bind s copy-mode
+# scroll also with mouse
+# Problem: can't select text anymore
+#set -g mode-mouse on
# use windows like tabs (S means shift key)
-bind -n S-down new-window
+bind -n S-down new-window -c "#{pane_current_path}"
bind -n S-left prev
bind -n S-right next
@@ -18,7 +24,6 @@ set -g base-index 1
set -g default-terminal "screen-256color"
# status line
-set -g status-utf8 on
set -g status-fg white
set -g status-bg blue
set -g window-status-current-bg white
@@ -26,4 +31,4 @@ set -g window-status-current-fg blue
# colorize messages in the command line
set-option -g message-bg black #base02
-set-option -g message-fg brightred #orange
+set-option -g message-fg brightred #orange \ No newline at end of file