using .env file, generated by build1stTime.sh

This commit is contained in:
Sven Jörns
2022-12-04 16:40:12 +03:00
parent b2c31446a4
commit 8249bc1f9b
4 changed files with 34 additions and 15 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
.env
.env*
.*swp
id_ed25519
id_ed25519.pub
+17
View File
@@ -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
+16 -13
View File
@@ -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:
-1
View File
@@ -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