Skip to content

Commit

Permalink
Merge pull request #17 from internetofwater/dev
Browse files Browse the repository at this point in the history
Update sitemap.xml build
  • Loading branch information
ksonda authored Jul 18, 2023
2 parents b3c477f + f3d24ad commit e037402
Show file tree
Hide file tree
Showing 5 changed files with 190 additions and 146 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
YOURLS_DB_USER: ${{ secrets.YOURLS_DB_USER }}
YOURLS_DB_PASSWORD: ${{ secrets.YOURLS_DB_PASSWORD }}
run: |
docker compose -p pidsgeoconnexus up -d --build
docker compose up -d --build
docker build -t build_yourls_uploader ./build/
- name: Fill Yourls table with data from namespaces
Expand All @@ -50,11 +50,11 @@ jobs:
run: |
docker run --rm --network=pidsgeoconnexus_yourls_host --name build_yourls \
--env YOURLS_DB_PASSWORD=${YOURLS_DB_PASSWORD:-arootpassword} --env YOURLS_DB_USER=${YOURLS_DB_USER:-root} \
-v /sitemap:/sitemap build_yourls_uploader
-v ./sitemap:/sitemap build_yourls_uploader
docker exec pidsgeoconnexus-mysql-1 sh -c "mysqldump --databases yourls -u ${YOURLS_DB_USER:-root} --password=${YOURLS_DB_PASSWORD:-arootpassword} --hex-blob --default-character-set=utf8mb4 --skip-triggers --set-gtid-purged=OFF | gzip > /docker-entrypoint-initdb.d/yourls.sql.gz"
mkdir backup
cp ./mysql/yourls.sql.gz backup/yourls.sql.gz
cp -R /sitemap yourls/sitemap
cp -R ./sitemap yourls/sitemap
docker compose down
- name: Zip sitemap
Expand Down
8 changes: 7 additions & 1 deletion build/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
FROM python
FROM python:3.9.13-slim

RUN \
apt-get update -y \
&& apt-get upgrade -y \
&& apt-get install -y git \
&& git clone -b master https://github.com/internetofwater/geoconnex.us.git /geoconnex.us

RUN mkdir /build
COPY . /build/
Expand Down
2 changes: 2 additions & 0 deletions build/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
click
GitPython
pyourls3==1.0.1
mysql-connector
Loading

0 comments on commit e037402

Please sign in to comment.