move stuff to workspace

This commit is contained in:
OMGeeky
2024-05-25 15:33:59 +02:00
parent 4bc47a2b10
commit 8187110a82
3 changed files with 0 additions and 4083 deletions

View File

@@ -1,53 +0,0 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Dockerfile" type="docker-deploy" factoryName="dockerfile" server-name="Docker">
<deployment type="dockerfile">
<settings>
<option name="imageTag" value="twba-twitch-fetcher"/>
<option name="buildArgs">
<list>
<DockerEnvVarImpl>
<option name="name" value="PROGNAME"/>
<option name="value" value="twba-twitch-fetcher"/>
</DockerEnvVarImpl>
</list>
</option>
<option name="buildKitEnabled" value="true"/>
<option name="containerName" value="twba-twitch-fetcher"/>
<option name="envVars">
<list>
<DockerEnvVarImpl>
<option name="name" value="TWBA_CONFIG"/>
<option name="value" value="/twba/configs/config.toml"/>
</DockerEnvVarImpl>
</list>
</option>
<option name="commandLineOptions" value="--restart=unless-stopped"/>
<option name="showCommandPreview" value="true"/>
<option name="sourceFilePath" value="Dockerfile"/>
<option name="volumeBindings">
<list>
<DockerVolumeBindingImpl>
<option name="containerPath" value="/twba/configs/"/>
<option name="hostPath" value="/twba/"/>
<option name="readOnly" value="true"/>
</DockerVolumeBindingImpl>
<DockerVolumeBindingImpl>
<option name="containerPath" value="/twba/tmp/"/>
<option name="hostPath" value="/var/tmp/twba/"/>
</DockerVolumeBindingImpl>
<DockerVolumeBindingImpl>
<option name="containerPath" value="/twba/data/"/>
<option name="hostPath" value="/twba/data/"/>
</DockerVolumeBindingImpl>
<DockerVolumeBindingImpl>
<option name="containerPath" value="/etc/ssl/certs"/>
<option name="hostPath" value="/etc/ssl/certs"/>
<option name="readOnly" value="true"/>
</DockerVolumeBindingImpl>
</list>
</option>
</settings>
</deployment>
<method v="2"/>
</configuration>
</component>

3986
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,44 +0,0 @@
FROM lukemathwalker/cargo-chef:latest-rust-1 AS chef
WORKDIR /app
FROM chef AS planner
COPY /src ./src
COPY /Cargo.toml .
COPY /Cargo.lock .
RUN cargo chef prepare --recipe-path recipe.json
FROM chef AS builder
COPY --from=planner /app/recipe.json recipe.json
# Build dependencies - this is the caching Docker layer!
RUN --mount=type=cache,target=/usr/local/cargo/registry \
--mount=type=cache,target=/home/root/app/target \
cargo chef cook --release --locked --recipe-path recipe.json
# Build application
COPY /src ./src
COPY /Cargo.toml .
COPY /Cargo.lock .
RUN --mount=type=cache,target=/usr/local/cargo/registry \
--mount=type=cache,target=/home/root/app/target \
cargo build --release --locked
# We do not need the Rust toolchain to run the binary!
FROM debian:bookworm AS runtime
WORKDIR /app
ARG PROGNAME
RUN apt-get update && apt-get install -y libssl-dev coreutils
# Create a script to run the command and sleep for one hour after the command is done
RUN echo "#!/bin/bash \n \
echo \"Running command: '$PROGNAME'\" \n \
# Run your command \n \
$PROGNAME \n \
echo \"Done with normal command. Sleeping for one hour\" \n \
# Sleep for one hour \n \
sleep 3600 \n \
echo \"Done with sleep. Exiting\" \
" > /app/entrypoint.sh
# Make the script executable
RUN chmod +x /app/entrypoint.sh
COPY --from=builder /app/target/release/$PROGNAME /usr/local/bin/$PROGNAME
CMD ["/app/entrypoint.sh"]