Skip to content

Commit

Permalink
update docker compose and network setup
Browse files Browse the repository at this point in the history
  • Loading branch information
tomkralidis committed Jan 19, 2025
1 parent b96edb4 commit 21be674
Show file tree
Hide file tree
Showing 23 changed files with 39 additions and 58 deletions.
9 changes: 3 additions & 6 deletions services/dockerhub/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
version: "3"

services:

# See https://github.com/maccyber/micro-dockerhub-hook
Expand All @@ -26,14 +24,13 @@ services:
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./scripts:/src/scripts
# Paths to docker-compose files who are triggered by scripts:
# Paths to docker compose files who are triggered by scripts:
- ./../pygeoapi_master:/srv/pygeoapi_master
- ./../home:/srv/home
- ./../pygeoapi_cite:/srv/pygeoapi_cite
- ./../pygeoapi_covid-19:/srv/pygeoapi_covid-19


networks:
default:
external:
name: pygeoapi-network
pygeoapi-network:
external: true
2 changes: 1 addition & 1 deletion services/dockerhub/scripts/home.update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

echo "Updating pygeoapi home..."

cd /srv/home && ./stop.sh && docker pull geopython/demo.pygeoapi.io:latest && docker-compose up -d
cd /srv/home && ./stop.sh && docker pull geopython/demo.pygeoapi.io:latest && docker compose up -d

echo "Cleaning up..."

Expand Down
6 changes: 3 additions & 3 deletions services/dockerhub/scripts/pygeoapi_latest.update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ echo "Updating pygeoapi_master..."

docker pull geopython/pygeoapi:latest

cd /srv/pygeoapi_master && ./stop.sh && ./build.sh && docker-compose up -d
cd /srv/pygeoapi_master && ./stop.sh && ./build.sh && docker compose up -d

echo "Updating pygeoapi_cite..."

cd /srv/pygeoapi_cite && ./stop.sh && ./build.sh && docker-compose up -d
cd /srv/pygeoapi_cite && ./stop.sh && ./build.sh && docker compose up -d

echo "Updating pygeoapi_covid-19..."

cd /srv/pygeoapi_covid-19 && ./stop.sh && ./build.sh && docker-compose up -d
cd /srv/pygeoapi_covid-19 && ./stop.sh && ./build.sh && docker compose up -d

echo "Cleaning up..."

Expand Down
2 changes: 1 addition & 1 deletion services/dockerhub/start.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash

./stop.sh
docker-compose up -d
docker compose up -d
4 changes: 2 additions & 2 deletions services/dockerhub/stop.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash

docker-compose stop
docker-compose rm --force
docker compose stop
docker compose rm --force
2 changes: 1 addition & 1 deletion services/home/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.6.7-alpine3.8
FROM python:3.11-alpine3.21

LABEL maintainer="Just van den Broecke <[email protected]>"

Expand Down
2 changes: 1 addition & 1 deletion services/pygeoapi_cite/build.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/bash

docker-compose build
docker compose build
7 changes: 2 additions & 5 deletions services/pygeoapi_cite/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
version: "3"

services:

pygeoapi_cite:
Expand Down Expand Up @@ -29,6 +27,5 @@ services:
- "traefik.docker.network=pygeoapi-network"

networks:
default:
external:
name: pygeoapi-network
pygeoapi-network:
external: true
2 changes: 1 addition & 1 deletion services/pygeoapi_cite/start.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash

./stop.sh
docker-compose up -d
docker compose up -d
4 changes: 2 additions & 2 deletions services/pygeoapi_cite/stop.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash

docker-compose stop
docker-compose rm --force
docker compose stop
docker compose rm --force
2 changes: 1 addition & 1 deletion services/pygeoapi_covid-19/build.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/bash

docker-compose build
docker compose build
7 changes: 2 additions & 5 deletions services/pygeoapi_covid-19/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
version: "3"

services:

pygeoapi_cite:
Expand Down Expand Up @@ -28,6 +26,5 @@ services:
- "traefik.docker.network=pygeoapi-network"

networks:
default:
external:
name: pygeoapi-network
pygeoapi-network:
external: true
2 changes: 1 addition & 1 deletion services/pygeoapi_covid-19/start.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash

./stop.sh
docker-compose up -d
docker compose up -d
4 changes: 2 additions & 2 deletions services/pygeoapi_covid-19/stop.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash

docker-compose stop
docker-compose rm --force
docker compose stop
docker compose rm --force
7 changes: 2 additions & 5 deletions services/pygeoapi_master/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
version: "3"

services:

pygeoapi_master:
Expand Down Expand Up @@ -27,6 +25,5 @@ services:
- "traefik.docker.network=pygeoapi-network"

networks:
default:
external:
name: pygeoapi-network
pygeoapi-network:
external: true
2 changes: 1 addition & 1 deletion services/pygeoapi_master/start.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash

./stop.sh
docker-compose up -d
docker compose up -d
4 changes: 2 additions & 2 deletions services/pygeoapi_master/stop.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash

docker-compose stop
docker-compose rm --force
docker compose stop
docker compose rm --force
7 changes: 2 additions & 5 deletions services/pygeoapi_stable/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
version: "3"

services:

pygeoapi_stable:
Expand Down Expand Up @@ -31,6 +29,5 @@ services:
- "traefik.docker.network=pygeoapi-network"

networks:
default:
external:
name: pygeoapi-network
pygeoapi-network:
external: true
2 changes: 1 addition & 1 deletion services/pygeoapi_stable/start.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash

./stop.sh
docker-compose up -d
docker compose up -d
4 changes: 2 additions & 2 deletions services/pygeoapi_stable/stop.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash

docker-compose stop
docker-compose rm --force
docker compose stop
docker compose rm --force
10 changes: 3 additions & 7 deletions services/traefik/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
version: '3.1'

services:
proxy:
image: traefik:1.7.10-alpine
image: traefik:v3.3.2

container_name: traefik

Expand All @@ -28,7 +26,5 @@ volumes:
traefik_logs:

networks:
default:
external:
name: pygeoapi-network

pygeoapi-network:
external: true
2 changes: 1 addition & 1 deletion services/traefik/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ export ACME_FILE="config/acme.json"
&& touch ${ACME_FILE}

chmod 600 ${ACME_FILE}
docker-compose up -d
docker compose up -d
4 changes: 2 additions & 2 deletions services/traefik/stop.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ export HTTP_PORT=80
[[ ${HOSTNAME} != PYGEOAPI ]] && HTTP_PORT=8000
export ACME_FILE="config/acme.json"

docker-compose stop
docker-compose rm --force
docker compose stop
docker compose rm --force
chmod 600 ${ACME_FILE}

0 comments on commit 21be674

Please sign in to comment.