-
Notifications
You must be signed in to change notification settings - Fork 339
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
84fd141
commit 0a87f9e
Showing
8 changed files
with
55 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
from starlette.applications import Starlette | ||
from starlette.staticfiles import StaticFiles | ||
|
||
app = Starlette() | ||
app.mount("/images", StaticFiles(directory="/websoft9/media"), name="images") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# modify time: 202310230550, you can modify here to trigger Docker Build action | ||
# modify time: 202310231530, you can modify here to trigger Docker Build action | ||
|
||
FROM python:3.10-bullseye AS buildstage | ||
LABEL maintainer="Websoft9<[email protected]>" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,7 @@ response="" | |
cred_path="/data/gitea/credential" | ||
admin_username="websoft9" | ||
admin_email="[email protected]" | ||
user_exist=0 | ||
|
||
while [ "$response" != "200" ]; do | ||
response=$(curl -s -o /dev/null -w "%{http_code}" localhost:3000) | ||
|
@@ -34,17 +35,20 @@ su -c " | |
exit 0 | ||
else | ||
gitea admin user create --admin --username '$admin_username' --random-password --email '$admin_email' > /tmp/credential | ||
user_exist=1 | ||
fi | ||
" git | ||
|
||
echo "Read credential from tmp" | ||
username=$(grep -o "New user '[^']*" /tmp/credential | sed "s/New user '//") | ||
if [ -z "$username" ] || [ "$username" != "websoft9" ]; then | ||
echo "username is not websoft9, exit" | ||
fi | ||
password=$(grep -o "generated random password is '[^']*" /tmp/credential | sed "s/generated random password is '//") | ||
rm -rf /tmp/credential | ||
if [ "$user_exist" -eq 1 ]; then | ||
echo "Read credential from tmp" | ||
username=$(grep -o "New user '[^']*" /tmp/credential | sed "s/New user '//") | ||
if [ -z "$username" ] || [ "$username" != "websoft9" ]; then | ||
echo "username is not websoft9, exit" | ||
fi | ||
password=$(grep -o "generated random password is '[^']*" /tmp/credential | sed "s/generated random password is '//") | ||
rm -rf /tmp/credential | ||
|
||
echo "Save to credential" | ||
json="{\"username\":\"$admin_username\",\"password\":\"$password\",\"email\":\"$admin_email\"}" | ||
echo "$json" > "$cred_path" | ||
echo "Save to credential" | ||
json="{\"username\":\"$admin_username\",\"password\":\"$password\",\"email\":\"$admin_email\"}" | ||
echo "$json" > "$cred_path" | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"version": "0.8.26-rc80", | ||
"version": "0.8.26-rc81", | ||
"plugins": { | ||
"portainer": "0.0.7", | ||
"nginx": "0.0.5", | ||
|