summaryrefslogtreecommitdiffstats
path: root/docker
diff options
context:
space:
mode:
authorHolger Cremer <HolgerCremer@gmail.com>2018-08-26 19:34:41 +0200
committerHolger Cremer <HolgerCremer@gmail.com>2018-08-26 19:34:41 +0200
commit0513f59f10eb2b60ecb32cb68f7add19ec623177 (patch)
treec333c9422532f198057647ad22a54e2da848112b /docker
parentb0b79db354a2bb89009e206b0fa19f810a816cec (diff)
downloadserial-barcode-scanner-0513f59f10eb2b60ecb32cb68f7add19ec623177.tar.bz2
updates the docker configuration for the new project layout
Diffstat (limited to 'docker')
-rw-r--r--docker/Dockerfile18
-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, 73 insertions, 21 deletions
diff --git a/docker/Dockerfile b/docker/Dockerfile
index 5aebc26..53a9048 100644
--- a/docker/Dockerfile
+++ b/docker/Dockerfile
@@ -26,7 +26,15 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
libgtk2.0-dev \
libsoup2.4-dev \
libgee-0.8-dev \
+ debhelper \
+ dh-sysuser \
+ libgmime-3.0-dev \
+ udev \
tmux \
+ # 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 && \
@@ -35,9 +43,9 @@ RUN set -ex && \
ENV SBC_DIR /mnt/serial-barcode-scanner
WORKDIR $SBC_DIR
-ADD . .
-RUN dpkg-buildpackage -b && apt install -y ./../shopsystem_*_*.deb
-#COPY tmux-config /root/.tmux.conf
-#COPY init.sh /root/
-#ENTRYPOINT ["/root/init.sh"]
+COPY tmux-config /root/.tmux.conf
+COPY init.sh /root/
+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 15b7741..818fc45 100755
--- a/docker/init.sh
+++ b/docker/init.sh
@@ -1,11 +1,7 @@
#!/bin/bash
-cd dbus
-make install
-cd config
-make install
-
-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