Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
Heyheylibrary
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TheJoeCoder
Heyheylibrary
Commits
522b58d7
Verified
Commit
522b58d7
authored
1 year ago
by
TheJoeCoder
Browse files
Options
Downloads
Patches
Plain Diff
Update demo
parent
25d15636
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
demo_reset.sh
+5
-0
5 additions, 0 deletions
demo_reset.sh
demo_start.sh
+5
-0
5 additions, 0 deletions
demo_start.sh
with
10 additions
and
0 deletions
demo_reset.sh
+
5
−
0
View file @
522b58d7
...
...
@@ -38,6 +38,7 @@ docker compose -f docker-compose.demo.yml stop web
# Reset the database
rm
db.sqlite3
cp
db.demo.sqlite3 db.sqlite3
chown
100:100 db.sqlite3
# Reset the media
rm
-rd
demo_media/
*
...
...
@@ -50,6 +51,10 @@ docker compose -f docker-compose.demo.yml up -d
wait_for_container
"web"
wait_for_container
"opensearch"
# Migrate the database and collect static files
docker compose
-f
docker-compose.demo.yml
exec
web python manage.py migrate
--noinput
docker compose
-f
docker-compose.demo.yml
exec
web python manage.py collectstatic
--no-input
--clear
# Wait until we can reach opensearch
os_ip
=
$(
get_ip_address
"opensearch"
)
echo
"
$os_ip
"
...
...
This diff is collapsed.
Click to expand it.
demo_start.sh
+
5
−
0
View file @
522b58d7
...
...
@@ -34,6 +34,7 @@ get_ip_address() {
# Get database ready
cp
db.demo.sqlite3 db.sqlite3
chown
100:100 db.sqlite3
# Backup media
tar
-cJvf
demo_media.tar.xz ./demo_media
...
...
@@ -45,6 +46,10 @@ docker compose -f docker-compose.demo.yml up -d
wait_for_container
"web"
wait_for_container
"opensearch"
# Migrate the database and collect static files
docker compose
-f
docker-compose.demo.yml
exec
web python manage.py migrate
--noinput
docker compose
-f
docker-compose.demo.yml
exec
web python manage.py collectstatic
--no-input
--clear
# Wait until we can reach opensearch
os_ip
=
$(
get_ip_address
"opensearch"
)
echo
"
$os_ip
"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment