Skip to content

Commit

Permalink
demo housekeeping updates (#61)
Browse files Browse the repository at this point in the history
* update entire setup

* use docker system prune

* s/docker compose rm/docker compose down/g

* update stop scripts

* update Docker Compose network settings
  • Loading branch information
tomkralidis authored Feb 17, 2025
1 parent 3079673 commit f4fddad
Show file tree
Hide file tree
Showing 49 changed files with 48 additions and 10,145 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ Have Ansible, Vagrant and VBox installed.
# Setup Vagrant with VirtualBox for Ubuntu 16.04 VM
cd demo.pygeoapi.io
vagrant box add geerlingguy/ubuntu1604
vagrant init geerlingguy/ubuntu1604
vagrant box add geerlingguy/ubuntu2404
vagrant init geerlingguy/ubuntu2404
# Will use Vagrantfile for auto-provisioning via Ansible
vagrant up
Expand Down
2 changes: 1 addition & 1 deletion Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Vagrant.configure("2") do |config|

# Every Vagrant development environment requires a box. You can search for
# boxes at https://vagrantcloud.com/search.
config.vm.box = "geerlingguy/ubuntu1604"
config.vm.box = "geerlingguy/ubuntu2404"

# Disable automatic box update checking. If you disable this, then
# boxes will only be checked for updates when the user runs
Expand Down
4 changes: 2 additions & 2 deletions ansible/bootstrap.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Inspired from https://github.com/5car1z/ansible-debian-provisioning
- name: "PyGeoAPI Ubuntu Server Setup"
- name: "pygeoapi Ubuntu Server Setup"
hosts: all
become: true
gather_facts: yes
Expand Down Expand Up @@ -54,5 +54,5 @@
shell: "cd {{ platform_home }}; ./build.sh"
become_user: "{{ my_admin_user }}"

- name: "Install PyGeoAPI System Service"
- name: "Install pygeoapi System Service"
shell: "{{ platform_home }}/install.sh"
8 changes: 4 additions & 4 deletions ansible/requirements.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@
version: v2.0.5

- src: oefenweb.postfix
version: v2.7.0
version: v3.7.3

- src: geerlingguy.pip
version: 1.3.0
version: 3.1.0

- src: geerlingguy.docker
version: 2.5.2
version: 7.4.4

# from GitHub
- src: https://github.com/justb4/ansible-ubuntu-base
name: justb4.ubuntu-base
version: v1.2
version: v1.4

- src: https://github.com/justb4/ansible-ubuntu-ntp
name: justb4.ubuntu-ntp
Expand Down
8 changes: 3 additions & 5 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,7 +24,7 @@ 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
Expand All @@ -35,5 +33,5 @@ services:

networks:
default:
external:
name: pygeoapi-network
name: pygeoapi-network
external: true
14 changes: 0 additions & 14 deletions services/dockerhub/scripts/docker-clean.sh

This file was deleted.

4 changes: 2 additions & 2 deletions services/dockerhub/scripts/home.update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

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..."

cd /src/scripts && ./docker-clean.sh
cd /src/scripts && docker system prune --force --volumes
8 changes: 4 additions & 4 deletions services/dockerhub/scripts/pygeoapi_latest.update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@ 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..."

cd /src/scripts && ./docker-clean.sh
cd /src/scripts && docker system prune --force --volumes
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
3 changes: 1 addition & 2 deletions services/dockerhub/stop.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/bin/bash

docker-compose stop
docker-compose rm --force
docker compose down --remove-orphans
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
Loading

0 comments on commit f4fddad

Please sign in to comment.