-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0a14421
commit a311982
Showing
6 changed files
with
88 additions
and
2 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Duplicate definition of DIST before FROM is needed to be able to use it | ||
# in docker image name: | ||
ARG DIST=xenial | ||
FROM sociomantictsunami/develdlang:$DIST-v7 as builder | ||
# Copies the whole project as makd needs git history: | ||
COPY . /project/ | ||
WORKDIR /project/ | ||
# Redefine arguments as env vars to be used inside build.sh script: | ||
ARG DIST=xenial | ||
ARG DMD=1.081.* | ||
ENV DMD=$DMD DIST=$DIST | ||
RUN docker/build.sh | ||
|
||
ARG DIST=xenial | ||
FROM sociomantictsunami/runtimebase:$DIST-v7 | ||
COPY --from=builder /project/build/production/pkg/ /packages/ | ||
COPY docker/install.sh . | ||
RUN ./install.sh && rm ./install.sh | ||
COPY doc/etc/config.ini /srv/dlsnode/etc/config.ini | ||
COPY docker/entrypoint.sh /srv/dlsnode/ | ||
WORKDIR /srv/dlsnode | ||
CMD ./entrypoint.sh |
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 |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#!/bin/sh | ||
set -eu | ||
|
||
# Compiler configuration | ||
|
||
. submodules/beaver/lib/dlang.sh | ||
|
||
set_dc_dver | ||
|
||
# Install dependencies | ||
|
||
case "$DMD" in | ||
dmd* ) PKG= ;; | ||
1.* ) PKG="dmd1=$DMD-$DIST" ;; | ||
2.*.s* ) PKG="dmd-transitional=$DMD-$DIST" ;; | ||
2.* ) if [ $(echo $DMD | cut -d. -f2) -ge 077 ]; then | ||
PKG="dmd-compiler=$DMD dmd-tools=$DMD libphobos2-dev=$DMD" | ||
else | ||
PKG="dmd-bin=$DMD libphobos2-dev=$DMD" | ||
fi ;; | ||
* ) echo "Unknown \$DMD ($DMD)" >&2; exit 1 ;; | ||
esac | ||
|
||
apt update | ||
apt install -y --allow-downgrades \ | ||
$PKG \ | ||
liblzo2-dev \ | ||
libebtree6-dev \ | ||
libpcre3-dev \ | ||
libgcrypt-dev \ | ||
libglib2.0-dev \ | ||
libgpg-error-dev | ||
|
||
# Build app | ||
|
||
if_d 2 make d2conv | ||
|
||
make all pkg F=production |
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/sh | ||
set -e | ||
|
||
if [ -z "$CREDENTIALS" ]; then | ||
echo "Must defined CREDENTIALS env var in form of client_name:key" | ||
exit 1 | ||
fi; | ||
|
||
echo $CREDENTIALS > etc/credentials | ||
|
||
dlsnode |
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/sh | ||
set -xeu | ||
|
||
apt update | ||
|
||
# Prepare folder structure and install dhtnode | ||
|
||
mkdir -p /srv/dlsnode/etc | ||
mkdir -p /srv/dlsnode/log | ||
mkdir -p /srv/dlsnode/data | ||
apt install -y /packages/dlsnode_* |