From f4d7ef9e8c68742818ff63a9ae9dcf5e381b723b Mon Sep 17 00:00:00 2001 From: Chris Date: Sun, 13 Dec 2020 16:37:09 +0000 Subject: [PATCH] Install Pinry --- bootstrap.sh | 2 ++ db/init/01-databases.sql | 1 + docker-compose.yml | 13 +++++++++++++ nginx.conf | 20 ++++++++++++++++++++ 4 files changed, 36 insertions(+) diff --git a/bootstrap.sh b/bootstrap.sh index 731fcd6..9b7b05b 100644 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -40,3 +40,5 @@ echo "no-port-forwarding,no-X11-forwarding,no-agent-forwarding,no-pty $(cat /hom systemctl enable docker --now docker-compose -f "/opt/scarif/docker-compose.yml" --env-file "/opt/scarif/.env" up -d + +docker exec -it scarif_pinry_1 python manage.py createsuperuser --settings=pinry.settings.docker diff --git a/db/init/01-databases.sql b/db/init/01-databases.sql index b4e94f4..2297caf 100644 --- a/db/init/01-databases.sql +++ b/db/init/01-databases.sql @@ -1,5 +1,6 @@ CREATE DATABASE IF NOT EXISTS `monica`; CREATE DATABASE IF NOT EXISTS `gitea`; +CREATE DATABASE IF NOT EXISTS `pinry`; # Nextcloud will automatically create a database on setup #CREATE DATABASE IF NOT EXISTS `nextcloud`; diff --git a/docker-compose.yml b/docker-compose.yml index 5e07d05..cca892d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -93,6 +93,17 @@ services: - "tower.scarif.local:${LOCAL_IP}" - "office.scarif.local:${LOCAL_IP}" + pinry: + image: 'getpinry/pinry' + volumes: + - pinry:/data + - ./pinry/local_settings.py:/data/local_settings.py + networks: + - nginx + - db + depends_on: + - db + gitea: image: gitea/gitea:1 environment: @@ -172,6 +183,7 @@ services: - gitea - collabora - cadvisor + - pinry - certs ports: - 80:80 @@ -196,6 +208,7 @@ volumes: nextcloud: certs: dashboard: + pinry: networks: db: diff --git a/nginx.conf b/nginx.conf index fc68524..f60f6eb 100644 --- a/nginx.conf +++ b/nginx.conf @@ -462,6 +462,26 @@ http { } } + upstream pinry-handler { + server pinry:80; + } + + server { + listen 443 ssl http2; + + ssl_certificate /etc/nginx/certs/scarif.local.crt; + ssl_certificate_key /etc/nginx/certs/scarif.local.key; + + gzip_types text/plain text/css application/json application/x-javascript + text/xml application/xml application/xml+rss text/javascript; + + server_name research.scarif.local; + + location / { + proxy_pass http://pinry-handler; + } + } + server { listen 80 default_server; listen [::]:80 default_server;