Redeploy plume

This commit is contained in:
Quentin 2022-01-27 13:31:25 +01:00
parent 831ddd3055
commit 00d7106a18
9 changed files with 38 additions and 21 deletions

View File

@ -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:

View File

@ -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"]

View File

@ -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

View File

@ -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"
]
}

View File

@ -0,0 +1 @@
USER AWS access key ID, eg. GKxxxx

View File

@ -0,0 +1 @@
USER AWS Endpoint, eg. s3.garage.tld

View File

@ -0,0 +1 @@
USER AWS Secret Access Key

View File

@ -1,3 +1,3 @@
python-consul==1.1.0
python-ldap==3.3.1
python-ldap==3.4.0
passlib==1.7.4

15
app/shell.nix Normal file
View File

@ -0,0 +1,15 @@
{
pkgs ? import <nixpkgs> {}
}:
with pkgs; mkShell {
nativeBuildInputs = [
nomad
docker-compose
python39Packages.pip
python39Packages.ldap
python39Packages.consul
python39Packages.passlib
];
}