forked from Deuxfleurs/infrastructure
Redeploy plume
This commit is contained in:
parent
831ddd3055
commit
00d7106a18
9 changed files with 38 additions and 21 deletions
|
@ -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:
|
||||
|
|
|
@ -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"]
|
||||
|
|
|
@ -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
|
|
@ -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"
|
||||
]
|
||||
}
|
||||
|
||||
|
|
1
app/plume/secrets/plume/aws_access_key_id
Normal file
1
app/plume/secrets/plume/aws_access_key_id
Normal file
|
@ -0,0 +1 @@
|
|||
USER AWS access key ID, eg. GKxxxx
|
1
app/plume/secrets/plume/aws_endpoint
Normal file
1
app/plume/secrets/plume/aws_endpoint
Normal file
|
@ -0,0 +1 @@
|
|||
USER AWS Endpoint, eg. s3.garage.tld
|
1
app/plume/secrets/plume/aws_secret_access_key
Normal file
1
app/plume/secrets/plume/aws_secret_access_key
Normal file
|
@ -0,0 +1 @@
|
|||
USER AWS Secret Access Key
|
|
@ -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
15
app/shell.nix
Normal file
|
@ -0,0 +1,15 @@
|
|||
{
|
||||
pkgs ? import <nixpkgs> {}
|
||||
}:
|
||||
|
||||
with pkgs; mkShell {
|
||||
nativeBuildInputs = [
|
||||
nomad
|
||||
docker-compose
|
||||
python39Packages.pip
|
||||
python39Packages.ldap
|
||||
python39Packages.consul
|
||||
python39Packages.passlib
|
||||
];
|
||||
}
|
||||
|
Loading…
Reference in a new issue