From 8249bc1f9b89bd8b70592021cf59226af142611a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sven=20J=C3=B6rns?= Date: Sun, 4 Dec 2022 16:40:12 +0300 Subject: [PATCH] using .env file, generated by build1stTime.sh --- .gitignore | 2 +- build1stTime.sh | 17 +++++++++++++++++ docker-compose.yml | 29 ++++++++++++++++------------- git2zola.sh | 1 - 4 files changed, 34 insertions(+), 15 deletions(-) diff --git a/.gitignore b/.gitignore index 15f1779..99c6b4d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ -.env +.env* .*swp id_ed25519 id_ed25519.pub diff --git a/build1stTime.sh b/build1stTime.sh index ab79647..1c9e878 100755 --- a/build1stTime.sh +++ b/build1stTime.sh @@ -1,4 +1,21 @@ #!/bin/bash +cat << EOF >.env +GITPROJECTNAME="serinty-website" +GITPROJECTUSER="Serinty" +GITSERVER="gogs.serinty.net" +GITSERVERPORT=22104 +GITUSER="gogs" +GITPROJECTNAME="serinty-website" +GITTHEMENAME="serinty-zola-theme" +THEME_NAME=${GITTHEMENAME} +LOCALUSER="swsuser" +LOCALGROUP="swsgroup" +SWSPORT=8970 +IDLE_TIME=86400 +OUTPUT_DIR="~/${GITPROJECTNAME}/public" +BASE_URL="http://docker.local:${SWSPORT}" + +EOF ssh-keygen -q -t ed25519 -C "swsuser@serinty.net" -f ./id_ed25519 docker secret create id_ed25519 id_ed25519 docker secret create id_ed25519.pub id_ed25519.pub diff --git a/docker-compose.yml b/docker-compose.yml index 3805577..701dd5b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -9,19 +9,22 @@ services: secrets: - id_ed25519 - id_ed25519.pub - environment: - - GITPROJECTNAME=serinty-website - - GITPROJECTUSER=Serinty - - GITSERVER=gogs.serinty.net - - GITSERVERPORT=22104 - - GITUSER=gogs - - GITPASSWD=gogspw - - LOCALUSER=swsuser - - LOCALGROUP=swsgroup - - SWSPORT=8970 - - GITTHEMENAME=serinty-zola-theme - - THEME_NAME=serinty-theme - - IDLE_TIME=86400 + env_file: + - .env + # - .env.production + # environment: + # - GITPROJECTNAME=serinty-website + # - GITPROJECTUSER=Serinty + # - GITSERVER=gogs.serinty.net + # - GITSERVERPORT=22104 + # - GITUSER=gogs + # - GITPASSWD=gogspw + # - LOCALUSER=swsuser + # - LOCALGROUP=swsgroup + # - SWSPORT=8970 + # - GITTHEMENAME=serinty-zola-theme + # - THEME_NAME=serinty-theme + # - IDLE_TIME=86400 secrets: id_ed25519: diff --git a/git2zola.sh b/git2zola.sh index ee5206d..984ce17 100755 --- a/git2zola.sh +++ b/git2zola.sh @@ -58,7 +58,6 @@ then BASE_URL="http://docker.local}" else #the port is a part of the url, so it has to be defined in the BASE_URL - BASE_URL="http://docker.local:${SWSPORT}" fi fi