Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
N
NACSOS Core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
MCC APSIS
NACSOS
NACSOS Core
Commits
e261febf
Commit
e261febf
authored
2 years ago
by
Tim Repke
Browse files
Options
Downloads
Patches
Plain Diff
add migrations to deploy ci
parent
fa45df5d
No related branches found
No related tags found
1 merge request
!14
Server deployment
Pipeline
#980
failed
2 years ago
Stage: build
Stage: test
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.gitignore
+1
-0
1 addition, 0 deletions
.gitignore
.gitlab-ci.yml
+8
-4
8 additions, 4 deletions
.gitlab-ci.yml
with
9 additions
and
4 deletions
.gitignore
+
1
−
0
View file @
e261febf
.idea
config/
venv/
p.py
__pycache__
/hypercorn.access
...
...
This diff is collapsed.
Click to expand it.
.gitlab-ci.yml
+
8
−
4
View file @
e261febf
...
...
@@ -57,10 +57,10 @@ deploy-to-production:
stage
:
deploy
script
:
-
echo "Becoming 'nacsos' user"
-
su - nacsos
-
su
do
-
u
nacsos
-s
-
cd /home/nacsos/nacsos-core
-
echo "Stopping NACSOS-core service"
-
systemctl
--user
stop nacsos-core
-
sudo
systemctl stop nacsos-core
.service
-
echo "Dropping virtual environment"
-
rm -rf venv
-
echo "Fetching updated source"
...
...
@@ -71,8 +71,12 @@ deploy-to-production:
-
source venv/bin/activate
-
echo "Installing requirements"
-
pip install -r requirements.txt
-
echo "Exiting 'nacsos' user scope"
-
echo "Handling migrations"
-
pip install alembic
-
cd venv/src/nacsos-data/
-
alembic upgrade head
-
echo "Starting NACSOS-core service"
-
systemctl --user start nacsos-core
-
sudo systemctl start nacsos-core.service
when
:
manual
only
:
-
production
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