Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Odevzdávací Systém MO
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Martin Mareš
Odevzdávací Systém MO
Commits
34887ef3
Commit
34887ef3
authored
4 years ago
by
Martin Mareš
Browse files
Options
Downloads
Patches
Plain Diff
Instalace: README
parent
ac444255
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
README.md
+51
-0
51 additions, 0 deletions
README.md
TODO
+1
-1
1 addition, 1 deletion
TODO
with
52 additions
and
1 deletion
README.md
+
51
−
0
View file @
34887ef3
...
...
@@ -6,6 +6,57 @@
. venv/bin/activate
pip install wheel
pip install -c constraints.txt -e .
# vytvořit mo/web/config.py podle etc/config.py.example
mkdir -p data/imports
## Instalace na produkční server
# Založit účet mo-web (jako root)
adduser --system mo-web --shell /bin/bash
loginctl enable-linger mo-web
# Založit databázi (jako správce PostgreSQL)
psql -e 'CREATE ROLE mo_osmo'
psql -e 'CREATE ROLE "mo-web" LOGIN'
psql -e 'GRANT mo_osmo TO "mo-web"' # a případně dalším uživatelům
psql -e 'CREATE DATABASE mo_osmo_test WITH OWNER=mo_osmo'
# Inicializovat databázi (už jako mo-web)
psql mo_osmo_test <db/db.ddl
# Založit adresář pro instanci
mkdir /akce/mo/osmo-test
setfacl -m u:mo-web:rwx -m g:mo:rwx /akce/mo/osmo-test
setfacl -d -m u:mo-web:rwx -m g:mo:rwx /akce/mo/osmo-test
# Zbytek jako uživatel mo-web v /akce/mo/osmo-test
git clone <repozitář> src
# Vytvořit etc/config.py podle src/etc/config.py.example
# Vytvořit etc/uwsgi.ini podle src/etc/uwsgi.ini.example
cd src
bin/deploy
# Inicializovat regiony v DB
. ../venv/bin/activate
bin/init-regions
# Případně ručně otestovat, že uwsgi funguje
# uwsgi --ini etc/osmo.ini
# Založit ~/.config/systemd/user/osmo_test.service podle etc/osmo.service.example
systemctl --user daemon-reload
systemctl --user enable osmo_test.service
systemctl --user start osmo_test.service
systemctl --user status osmo_test.service
# Nastavit nginx:
location /osmo-test {
include uwsgi_params;
uwsgi_pass unix:/akce/mo/osmo-test/var/osmo.sock;
}
# Na instalaci nové verze pak stačí spustit bin/deploy
## Mražení závislostí
...
...
This diff is collapsed.
Click to expand it.
TODO
+
1
−
1
View file @
34887ef3
- nastavit cestu k cookies
- budeme znát roky narození?
- uklidit v logování (jak do DB, tak do app.logger)
- na import by bylo hezké mít testy
...
...
@@ -15,6 +14,7 @@
Nasazení:
- kontakt na správce
- mailing list
- zkontrolovat rotování logů (i u /akce/mathletics/ a jiných instancí uwsgi)
### Dořešit v importu škol ###
...
...
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