- migration where not being applied as the old structure was successfully parsed as the new structure - incorrect field order for toml serialization - docker stuff
28 lines
908 B
Shell
Executable file
28 lines
908 B
Shell
Executable file
#!/bin/bash
|
|
USER=${SUDO_USER:-$(whoami)}
|
|
|
|
echo "Generating for ${USER}"
|
|
|
|
set -e
|
|
|
|
echo "Building docker image"
|
|
# 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}")" \
|
|
-t jobboerse:pkgbuild \
|
|
-f ./Dockerfile-pkgbuild \
|
|
.
|
|
|
|
echo "Starting empheral container"
|
|
# 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:/var/lib/jobboerse/job_offers \
|
|
-v "$(pwd)"/packages/jobboerse/config/dist-test-config.toml:/etc/jobboerse/config.toml \
|
|
-v "$(pwd)"/packages/jobboerse/config/login.toml:/etc/jobboerse/login.toml \
|
|
jobboerse:pkgbuild
|