29 lines
882 B
Bash
29 lines
882 B
Bash
POD=mirrormanager2
|
|
|
|
podman pod exists $POD || podman pod create -p 5000:80 -n $POD
|
|
|
|
podman run \
|
|
--pod $POD \
|
|
--name nginx \
|
|
--replace \
|
|
-v $PWD/nginx.conf:/etc/nginx/conf.d/default.conf:ro \
|
|
-d docker.io/library/nginx:1.13-alpine
|
|
|
|
test -d tmp || mkdir tmp
|
|
test -f client_secrets.json || (echo "missing client_secrets" && exit 2)
|
|
|
|
podman run \
|
|
--pod $POD \
|
|
--name mm2 \
|
|
--replace \
|
|
-e 'MM2_CONFIG=/etc/mirrormanager/mirrormanager2.cfg' \
|
|
-v $PWD/mirrormanager2.cfg:/etc/mirrormanager/mirrormanager2.cfg \
|
|
-v $PWD/client_secrets.json:/etc/mirrormanager/client_secrets.json \
|
|
-v $PWD/tmp:/var/tmp:rw \
|
|
-d git.resf.org/infrastructure/mirrormanager2:latest
|
|
|
|
# Setup sqlite database
|
|
echo "mirrormanager2 and nginx have been statred. You may need to run:"
|
|
|
|
echo "podman exec mm2 /usr/bin/python3 -m flask -A mirrormanager2.app db sync"
|