aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/docker-compose.yml4
-rw-r--r--app/plume/build/plume/Dockerfile14
-rwxr-xr-xapp/plume/build/plume/plm-start9
-rw-r--r--app/plume/deploy/plume.hcl12
-rw-r--r--app/plume/secrets/plume/aws_access_key_id1
-rw-r--r--app/plume/secrets/plume/aws_endpoint1
-rw-r--r--app/plume/secrets/plume/aws_secret_access_key1
-rw-r--r--app/requirements.txt2
-rw-r--r--app/shell.nix15
9 files changed, 38 insertions, 21 deletions
diff --git a/app/docker-compose.yml b/app/docker-compose.yml
index e7fde9e..a63b08f 100644
--- a/app/docker-compose.yml
+++ b/app/docker-compose.yml
@@ -82,8 +82,8 @@ services:
build:
context: ./plume/build/plume
args:
- VERSION: 8c372aa6fcd05083601903d83b0fcb4915585a95
- image: superboum/plume:v4
+ VERSION: 57a54cf016cdf566fe45c081bda1971f176c4532
+ image: superboum/plume:v7
postfix:
build:
diff --git a/app/plume/build/plume/Dockerfile b/app/plume/build/plume/Dockerfile
index 0afe17d..1f57a52 100644
--- a/app/plume/build/plume/Dockerfile
+++ b/app/plume/build/plume/Dockerfile
@@ -1,4 +1,4 @@
-FROM rust:1.54.0-slim-bullseye as builder
+FROM rust:1.58.1-slim-bullseye as builder
RUN apt-get update && \
apt-get install -y \
@@ -10,6 +10,7 @@ RUN apt-get update && \
libpq-dev \
gettext \
git \
+ python \
curl \
gcc \
make \
@@ -25,11 +26,11 @@ WORKDIR /opt/plume
RUN git checkout ${VERSION}
WORKDIR /opt/plume/script
-RUN chmod a+x ./wasm-deps.sh && sleep 1 && ./wasm-deps.sh
+RUN chmod a+x ./wasm-deps.sh && ./wasm-deps.sh
WORKDIR /opt/plume
RUN cargo install wasm-pack
-RUN chmod a+x ./script/plume-front.sh && sleep 1 && ./script/plume-front.sh
+RUN chmod a+x ./script/plume-front.sh && ./script/plume-front.sh
RUN cargo install --path ./ --force --no-default-features --features postgres
RUN cargo install --path plume-cli --force --no-default-features --features postgres
RUN cargo clean
@@ -40,13 +41,14 @@ FROM debian:bullseye-slim
RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates \
libpq5 \
- libssl1.1
+ libssl1.1 \
+ rclone \
+ fuse
WORKDIR /app
COPY --from=builder /opt/plume /app
COPY --from=builder /usr/local/cargo/bin/plm /usr/local/bin/
COPY --from=builder /usr/local/cargo/bin/plume /usr/local/bin/
-COPY plm-start /usr/local/bin/
-CMD ["plm-start"]
+CMD ["plume"]
diff --git a/app/plume/build/plume/plm-start b/app/plume/build/plume/plm-start
deleted file mode 100755
index da9d288..0000000
--- a/app/plume/build/plume/plm-start
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/bash
-
-until plm migration run;
- do sleep 2;
-done
-plm search init
-plm instance new --domain "$DOMAIN_NAME" --name "$INSTANCE_NAME" --private
-
-plume
diff --git a/app/plume/deploy/plume.hcl b/app/plume/deploy/plume.hcl
index e89348f..5bb62f7 100644
--- a/app/plume/deploy/plume.hcl
+++ b/app/plume/deploy/plume.hcl
@@ -15,16 +15,22 @@ job "plume" {
}
task "plume" {
+ constraint {
+ attribute = "${attr.unique.hostname}"
+ operator = "="
+ value = "digitale"
+ }
+
driver = "docker"
config {
- image = "superboum/plume:v4"
+ image = "superboum/plume:v7"
network_mode = "host"
ports = [ "web_port" ]
#command = "cat"
#args = [ "/dev/stdout" ]
volumes = [
- "/mnt/glusterfs/plume/media:/app/static/media",
- "/mnt/glusterfs/plume/search:/app/search_index"
+ "/mnt/ssd/plume/search_index:/app/search_index",
+ "/mnt/ssd/plume/media:/app/static/media"
]
}
diff --git a/app/plume/secrets/plume/aws_access_key_id b/app/plume/secrets/plume/aws_access_key_id
new file mode 100644
index 0000000..8129980
--- /dev/null
+++ b/app/plume/secrets/plume/aws_access_key_id
@@ -0,0 +1 @@
+USER AWS access key ID, eg. GKxxxx
diff --git a/app/plume/secrets/plume/aws_endpoint b/app/plume/secrets/plume/aws_endpoint
new file mode 100644
index 0000000..9868a5a
--- /dev/null
+++ b/app/plume/secrets/plume/aws_endpoint
@@ -0,0 +1 @@
+USER AWS Endpoint, eg. s3.garage.tld
diff --git a/app/plume/secrets/plume/aws_secret_access_key b/app/plume/secrets/plume/aws_secret_access_key
new file mode 100644
index 0000000..03a5225
--- /dev/null
+++ b/app/plume/secrets/plume/aws_secret_access_key
@@ -0,0 +1 @@
+USER AWS Secret Access Key
diff --git a/app/requirements.txt b/app/requirements.txt
index 7874d93..018e21c 100644
--- a/app/requirements.txt
+++ b/app/requirements.txt
@@ -1,3 +1,3 @@
python-consul==1.1.0
-python-ldap==3.3.1
+python-ldap==3.4.0
passlib==1.7.4
diff --git a/app/shell.nix b/app/shell.nix
new file mode 100644
index 0000000..c9b8053
--- /dev/null
+++ b/app/shell.nix
@@ -0,0 +1,15 @@
+{
+ pkgs ? import <nixpkgs> {}
+}:
+
+with pkgs; mkShell {
+ nativeBuildInputs = [
+ nomad
+ docker-compose
+ python39Packages.pip
+ python39Packages.ldap
+ python39Packages.consul
+ python39Packages.passlib
+ ];
+}
+