1234567891011121314151617181920212223242526272829303132 |
- #!/bin/bash
- # backup README
- cp README.md DOC.md
- # delete this git repo and sync the offical one
- rm -rf .git
- git clone https://github.com/umap-project/umap.git tmp
- rsync -r -L tmp/ .
- rm -rf tmp/
- # checkout to latest tag
- TAG=$(git tag -l | tail -1)
- git checkout $TAG
- # create two default branch
- git switch -c current
- git switch -c upstream
- # build docker image
- chmod +x docker-entrypoint.sh
- docker build --tag umap:$TAG .
- # initialize directories and
- # fix db volume permission to enable backup without root needed
- mkdir static uploads db
- chown -R 70:$USER db
- chmod g=rwx,o-rwx -R db
- # setup umap container tagname
- sed -i 's/umap:latest/umap:'${TAG}'/g' docker-compose.yml;
- docker-compose up -d;
|