Add option to build with different database types (#13)

* Add argument for database type

The optional argument "-d" allows to customize the database type.

* Modify patch to work with all db types

* Add database type to filename

* Add dynamic modification of systemd-unit

Dynamically changes the systemd-unit to require the appropriate database service.
This commit is contained in:
Masgalor
2020-04-28 18:22:14 +02:00
committed by GitHub
parent de47482b8d
commit e086904865
2 changed files with 22 additions and 13 deletions
+8 -10
View File
@@ -22,7 +22,7 @@
# Make sure that we actually build the project
RUN touch src/main.rs
@@ -62,34 +62,25 @@
@@ -62,10 +62,6 @@
# because we already have a binary built
FROM debian:buster-slim
@@ -30,15 +30,13 @@
-ENV ROCKET_PORT=80
-ENV ROCKET_WORKERS=10
-
-# Install needed libraries
-RUN apt-get update && apt-get install -y \
- --no-install-recommends \
- openssl \
- ca-certificates \
- curl \
- sqlite3 \
- && rm -rf /var/lib/apt/lists/*
-
# Install needed libraries
RUN apt-get update && apt-get install -y \
--no-install-recommends \
@@ -75,21 +71,25 @@
sqlite3 \
&& rm -rf /var/lib/apt/lists/*
-RUN mkdir /data
-VOLUME /data
-EXPOSE 80