diff --git a/.github/workflows/deploy.docs.yml b/.github/workflows/deploy.docs.yml index 6155e42..7d908f4 100644 --- a/.github/workflows/deploy.docs.yml +++ b/.github/workflows/deploy.docs.yml @@ -9,7 +9,7 @@ name: Docs Deploy ⚙️ on: push: paths: - - 'services/docs/**' + - 'docs/**' jobs: main: diff --git a/.github/workflows/deploy.home.yml b/.github/workflows/deploy.home.yml new file mode 100644 index 0000000..d04939b --- /dev/null +++ b/.github/workflows/deploy.home.yml @@ -0,0 +1,32 @@ +# Ansible workflow for single service deployment. +# Uses: https://github.com/dawidd6/action-ansible-playbook +# Options: https://github.com/dawidd6/action-ansible-playbook/blob/master/main.js +# Author: Just van den Broecke - 2021 +# +name: Home Deploy ⚙️ + +# Trigger only when services/home subdir changed +on: + push: + paths: + - 'services/home/**' + +jobs: + main: + runs-on: ubuntu-20.04 + + steps: + - name: Checkout ✅ + uses: actions/checkout@v2 + + - name: Run playbook ⚙ + uses: dawidd6/action-ansible-playbook@v2 + with: + playbook: deploy.yml + directory: ./ansible + key: ${{secrets.ANSIBLE_SSH_PRIVATE_KEY}} + inventory: ${{secrets.ANSIBLE_INVENTORY_PROD}} + vault_password: ${{secrets.ANSIBLE_VAULT_PASSWORD}} + options: | + --tags home + --verbose diff --git a/ansible/deploy.yml b/ansible/deploy.yml index 3b58d66..e9ce0e8 100644 --- a/ansible/deploy.yml +++ b/ansible/deploy.yml @@ -49,8 +49,12 @@ environment: "{{ postgis_env }}" tags: postgis + - name: "home" + shell: "cd {{ services_home }}/home && ./deploy.sh && docker ps" + tags: home + - name: "docs" - shell: "cd {{ services_home }}/docs && ./deploy.sh && docker ps" + shell: "cd {{ my_git_home }}/docs && ./deploy.sh && docker ps" tags: docs - name: "admin" diff --git a/services/docs/docker-compose.yml b/services/docs/docker-compose.yml deleted file mode 100644 index 16959a9..0000000 --- a/services/docs/docker-compose.yml +++ /dev/null @@ -1,37 +0,0 @@ -version: '3.3' - -services: - - docs: - - build: ./ - - container_name: docs - - expose: - - "8000" - -# ports: -# - "5000:8000" - - labels: - # Enable Traefik routing on overlay service network - - "traefik.enable=true" - - "traefik.docker.network=service-network" - - # SSL/https router - - "traefik.http.routers.docs_https.rule=Host(`${TRAEFIK_SSL_DOMAIN}`)" - - "traefik.http.routers.docs_https.entrypoints=https" - - "traefik.http.routers.docs_https.tls=${TRAEFIK_USE_TLS}" - - "traefik.http.routers.docs_https.tls.certresolver=${TRAEFIK_SSL_CERT_RESOLVER}" - - "traefik.http.routers.docs_https.tls.options=my_default@file" - - "traefik.http.routers.docs_https.middlewares=secure-headers@file" - - # local http router - - "traefik.http.routers.docs_http.rule=Host(`localhost`)" - - "traefik.http.routers.docs_http.entrypoints=http" - -networks: - default: - external: - name: service-network diff --git a/services/docs/Dockerfile b/services/home/Dockerfile similarity index 100% rename from services/docs/Dockerfile rename to services/home/Dockerfile diff --git a/services/docs/README.md b/services/home/README.md similarity index 86% rename from services/docs/README.md rename to services/home/README.md index 04bbb7e..7379a7f 100644 --- a/services/docs/README.md +++ b/services/home/README.md @@ -10,7 +10,7 @@ when committed/pushed. A GitHub Action invokes an Ansible Playbook. See the following deployment files: -* [GitHub Action](../../.github/workflows/deploy.docs.yml) +* [GitHub Action](../../.github/workflows/deploy.home.yml) * [Ansible Playbook](../../ansible/deploy.yml) The Ansible Playbook can also be invoked directly. diff --git a/services/docs/deploy.sh b/services/home/deploy.sh similarity index 100% rename from services/docs/deploy.sh rename to services/home/deploy.sh diff --git a/services/home/docker-compose.yml b/services/home/docker-compose.yml new file mode 100644 index 0000000..a67c2ee --- /dev/null +++ b/services/home/docker-compose.yml @@ -0,0 +1,37 @@ +version: '3.3' + +services: + + home: + + build: ./ + + container_name: home + + expose: + - "8000" + +# ports: +# - "5000:8000" + + labels: + # Enable Traefik routing on overlay service network + - "traefik.enable=true" + - "traefik.docker.network=service-network" + + # SSL/https router + - "traefik.http.routers.home_https.rule=Host(`${TRAEFIK_SSL_DOMAIN}`)" + - "traefik.http.routers.home_https.entrypoints=https" + - "traefik.http.routers.home_https.tls=${TRAEFIK_USE_TLS}" + - "traefik.http.routers.home_https.tls.certresolver=${TRAEFIK_SSL_CERT_RESOLVER}" + - "traefik.http.routers.home_https.tls.options=my_default@file" + - "traefik.http.routers.home_https.middlewares=secure-headers@file" + + # local http router + - "traefik.http.routers.home_http.rule=Host(`localhost`)" + - "traefik.http.routers.home_http.entrypoints=http" + +networks: + default: + external: + name: service-network diff --git a/services/home/src/docs/index.md b/services/home/src/docs/index.md new file mode 100644 index 0000000..594874c --- /dev/null +++ b/services/home/src/docs/index.md @@ -0,0 +1,54 @@ +--- +title: OGC-API-Testbed Landing Page +--- + +# OGC-API-Testbed Home + +Landing page for this server instance. +For full documentation see [apitestdocs.geonovum.nl](https://apitestdocs.geonovum.nl). + +## Questions? + +[![Gitter](https://img.shields.io/gitter/room/Geonovum/ogc-api-testbed.svg?style=flat-square)](https://gitter.im/Geonovum/ogc-api-testbed) + +## Services + +Below the (web-) services running on this domain. Click links to view and interact. + +### OGC API Features + +Access the interactive endpoints of [OGC API Features](https://ogcapi.ogc.org/features/) +Open Source products running in this instance. Links to documentation and HOWTOs included: + +| Endpoint | Author | Docs | HOWTO +| --- | --- | --- | --- +| [/pygeoapi](/pygeoapi) | [GeoPython Community](https://geopython.github.io/) | [link](https://docs.pygeoapi.io/en/latest/) | [link](howto/howto_pygeoapi.md) +| [/ldproxy](/ldproxy) | Interactive Instruments | [link](https://interactive-instruments.github.io/ldproxy/) | [link](howto/howto_ldproxy.md) +| [/geoserver](/geoserver/ogc/features) | GeoServer Community | [link](https://docs.geoserver.org/latest/en/user/community/ogc-api/index.html) | [link](howto/howto_geoserver.md) +| [/qgis*](/qgis/wfs3) | QGIS Community | [link](https://www.qgis.org/) | [link](howto/howto_qgis.md) +| [/pycsw/csw.py](/pycsw/csw.py/collections/metadata:main) | [GeoPython Community](https://geopython.github.io/) | [docs](https://docs.pycsw.org/en/latest/index.html) | [HOWTO](howto/howto_pycsw.md) + + +* *"QGIS" is the QGIS Server Application.* + +### Storage Services + +The above services serve data from local files (e.g. GeoPackage) and these storage services: + +* "PostGIS" - access via port 5432 - spatial database based on PostgreSQL. +* Manage data with the [PGAdmin web application](/pgadmin) + +### Supporting Services + +These are services for administration and maintenance. + +| Endpoint | What / Author | Docs | HOWTO +| --- | --- | --- | --- +| [PGAdmin](/pgadmin) | Manage PostgreSQL Data | PGAdmin Community | [link](https://www.pgadmin.org/) | [link](howto/howto_pgadmin.md) +| [Portainer](/portainer/) | Visual Docker Manager | Docker | [link](https://www.portainer.io/) | [link](howto/howto_portainer.md) +| [GeoHealthCheck](/ghc) | OGC Services Monitor | [GeoPython Community](https://geopython.github.io) | [link](https://geohealthcheck.org) | [link](howto/howto_ghc.md) + +## Links + +* [Project GitHub Repo](https://github.com/Geonovum/ogc-api-testbed) +* [apitestdocs.geonovum.nl](https://apitestdocs.geonovum.nl) - all documentation diff --git a/services/home/src/mkdocs.yml b/services/home/src/mkdocs.yml new file mode 100644 index 0000000..4a6298b --- /dev/null +++ b/services/home/src/mkdocs.yml @@ -0,0 +1,4 @@ +site_name: Geonovum OGC API Testbed +nav: + - Home: index.md + - Code: https://github.com/Geonovum/ogc-api-testbed diff --git a/services/docs/start.sh b/services/home/start.sh similarity index 100% rename from services/docs/start.sh rename to services/home/start.sh diff --git a/services/docs/stop.sh b/services/home/stop.sh similarity index 100% rename from services/docs/stop.sh rename to services/home/stop.sh