-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Build and push and test Docker containers (#10)
* organize Dockerfiles * update action according to the dockerfile re-org * try to fix docker platform * add test-docker-compose.yml * load a default raster table * update readme * test action 1 * test action 2 * test action 3 * fix db * fix something * test action * remove used stuff
- Loading branch information
1 parent
387f869
commit 0d72ec6
Showing
18 changed files
with
241 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
50 changes: 50 additions & 0 deletions
50
.github/workflows/push-docker-latest-and-test-docker-compose.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
name: Push Docker latest and test Docker Compose | ||
|
||
on: | ||
release: | ||
types: [published] | ||
#on: | ||
# push: | ||
# branches: | ||
# - dev | ||
|
||
jobs: | ||
push-docker-latest: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- | ||
name: Push docker latest | ||
run: | | ||
docker buildx imagetools create -t gplates/postgis:latest gplates/postgis:amd64-${{ github.event.release.tag_name }} gplates/postgis:arm64-${{ github.event.release.tag_name }} | ||
docker buildx imagetools create -t gplates/gws:latest gplates/gws:amd64-${{ github.event.release.tag_name }} gplates/gws:arm64-${{ github.event.release.tag_name }} | ||
test-docker-compose: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- | ||
name: Check out repository code | ||
uses: actions/checkout@v4 | ||
- | ||
name: Start Docker compose | ||
run: | | ||
cd docker | ||
docker-compose up -d | ||
- | ||
name: Sleep for 30 seconds | ||
run: sleep 30s | ||
shell: bash | ||
- | ||
name: Check Docker compose | ||
if: always() | ||
run: | | ||
docker ps | ||
docker network ls | ||
docker inspect docker_gws_1 -f "{{json .NetworkSettings.Networks }}" | ||
wget http://localhost:18000 | ||
curl --fail -s "http://localhost:18000/raster/query?lon=128.86&lat=-12.42&raster_name=crustal_thickness" || exit 1 | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
# This is for Michael Chin only... | ||
version: '3.9' | ||
|
||
volumes: | ||
gws-code: | ||
external: true | ||
name: gws-code | ||
gws-db-data: | ||
external: true | ||
name: gws-db-data-new | ||
|
||
services: | ||
gws-postgis: | ||
image: gplates/postgis | ||
networks: | ||
- gws-net | ||
hostname: gws-postgis | ||
volumes: | ||
- gws-db-data:/var/lib/postgresql/15/main | ||
ports: | ||
- 5432:5432 | ||
environment: | ||
- POSTGRES_PASSWORD="this is not a real password! go away!" | ||
restart: on-failure | ||
healthcheck: | ||
test: pg_isready -U gplates -d gplates | ||
interval: 1m30s | ||
timeout: 10s | ||
retries: 3 | ||
|
||
gws: | ||
image: gplates/gws | ||
networks: | ||
- gws-net | ||
hostname: gws | ||
depends_on: | ||
- gws-postgis | ||
- gws-redis | ||
volumes: | ||
- gws-code:/gws | ||
ports: | ||
- 18000:80 | ||
restart: on-failure | ||
healthcheck: | ||
test: curl --fail -s "http://localhost:80/raster/query?lon=128.86&lat=-12.42&raster_name=crustal_thickness" || exit 1 | ||
interval: 1m30s | ||
timeout: 10s | ||
retries: 3 | ||
|
||
gws-redis: | ||
image: redis | ||
networks: | ||
- gws-net | ||
hostname: gws-redis | ||
restart: on-failure | ||
healthcheck: | ||
test: redis-cli -h gws-redis ping | ||
interval: 1m30s | ||
timeout: 10s | ||
retries: 3 | ||
|
||
|
||
networks: | ||
gws-net: | ||
external: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.