[Draft] Implement Early deletion by Submitter #37 #38

Merged
ben merged 15 commits from ben/Jobboerse:main into main 2023-01-28 18:00:00 +01:00
7 changed files with 3 additions and 116 deletions
Showing only changes of commit ba0d3931a4 - Show all commits

remove docker support

Bennet Bleßmann 2023-01-28 14:03:14 +01:00 committed by Bennet Bleßmann
Signed by: ben
GPG key ID: 3BE1A1A3CBC3CF99

View file

@ -24,6 +24,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Removed
- `./scripts/adjust_thirdparty.sh` as it is no longer necessary with cargo-bundle-license version 1.0.0
- docker support
- no longer contains a docker file for dev/prod usage
- dockerfile to test arch pkgbuild is still there
## [0.2.4] (2022-08-04)

View file

@ -1,74 +0,0 @@
FROM alpine AS source
WORKDIR /source
COPY Cargo.lock Cargo.toml deny.toml ./
COPY packages ./packages
FROM rust:1.64-alpine AS rust-with-musl-dev
RUN apk add --no-cache musl-dev
FROM rust-with-musl-dev AS check-deny
WORKDIR /deny
# required for building vendored openssl :(
RUN apk add --no-cache perl make
RUN cargo install cargo-deny --locked
COPY Cargo.toml deny.toml ./
COPY packages ./packages
RUN cargo deny check
FROM rust-with-musl-dev AS prepare-build
WORKDIR /build
RUN mkdir /jobboerse
COPY Cargo.toml Cargo.lock ./
COPY packages ./packages
RUN cargo fetch
FROM prepare-build AS build
ARG BUILD_FLAGS=""
RUN cargo build --verbose --release --frozen $BUILD_FLAGS
FROM alpine AS run
ARG UID=1999
ARG GID=1999
EXPOSE 8080/tcp
RUN echo $UID $GID
RUN addgroup -g $GID -S jobboerse-server
RUN adduser -u $UID -G jobboerse-server -D -Hh /jobboerse jobboerse-server
RUN mkdir -p /jobboerse/job_offers
RUN chown -R jobboerse-server:jobboerse-server /jobboerse
VOLUME ["/config"]
VOLUME ["/jobboerse/job_offers"]
RUN chown -R jobboerse-server:jobboerse-server /jobboerse
WORKDIR /jobboerse
COPY --from=build /build/target/release/jobboerse ./
RUN chmod a+x /jobboerse/jobboerse
RUN chmod a+r -R /jobboerse /config
COPY --from=build /build/packages/jobboerse/static/ ./static/
COPY --from=build /build/packages/jobboerse/templates/ ./templates/
RUN chmod a+r -R /jobboerse /config
USER jobboerse-server
RUN chown -R jobboerse-server:jobboerse-server /jobboerse
ENTRYPOINT ["/jobboerse/jobboerse"]
CMD ["--config", "/config/config.toml", "--mode", "production"]

View file

@ -1,10 +0,0 @@
url_base_path = "jobbörse"
banner = "Hinweis: Die Jobbörse wird aktuall noch evaluiert und befindet sich noch nichts im produktiven Betrieb!"
data_storage_path = "/jobboerse/job_offers"
[login_provider]
type = 'Development'
[email]
from = "jobs@localhost"
subject = "Test"

View file

@ -1,10 +0,0 @@
#!/usr/bin/env bash
SCRIPT_DIR=$(realpath "$(dirname "${BASH_SOURCE[0]}")")
set -e
echo "Building Docker Image"
source ${SCRIPT_DIR}/build_dev_image.sh
echo "Starting Docker Container"
source ${SCRIPT_DIR}/run_dev_container.sh

View file

@ -1,9 +0,0 @@
#!/usr/bin/env bash
USER=${SUDO_USER:-$(whoami)}
echo "Generating for ${USER}"
# needs root as otherwise we can't run it with root later (images will be in the users images but runing from root images)
# see run_dev_conatiner.sh for why that needs root
sudo docker build --rm --build-arg UID="$(id -u "${USER}")" --build-arg GID="$(id -g "${USER}")" --build-arg BUILD_FLAGS="--features=dev_mode" --tag jobboerse:dev .

View file

@ -1,3 +0,0 @@
#!/usr/bin/env bash
docker build --rm --build-arg UID=$(id -u ${SUDO_USER:-$(whoami)}) --build-arg GID=$(id -g ${SUDO_USER:-$(whoami)}) --tag jobboerse:prod .

View file

@ -1,10 +0,0 @@
# root is necessary for the volums to be mounted correctly
# otherwise they will be owned by root instead of the correct user
sudo docker run \
--rm \
-p 8080:8080 \
-v "$(pwd)"/job_offers:/jobboerse/job_offers \
-v "$(pwd)"/packages/jobboerse/config:/config \
jobboerse:dev \
--config=/config/dev-docker-config.toml \
--mode=development