Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

License

NotificationsYou must be signed in to change notification settings

EIDA/stationbook

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This repository is deployed atorfeus-eu.org/stationbook.

Quick start guide

  1. Create env file with config usingcp src/stationbook/.env.sample src/stationbook/.env and adjust as needed:

    SECRET_KEY='abcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*(-_=+)'DEBUG=FalseALLOWED_HOSTS=.localhost,127.0.0.1,0.0.0.0DATABASE_URL=sqlite:////data/stationbook/db/db.sqlite3EMAIL_BACKEND=django.core.mail.backends.console.EmailBackendCACHE_BACKEND=django.core.cache.backends.locmem.LocMemCacheCACHE_LOCATION='sb_cache'CACHE_TIME_SHORT=1800CACHE_TIME_MEDIUM=3600CACHE_TIME_LONG=43200SB_URL_BASE='stationbook/'CSRF_COOKIE_HTTPONLY = TrueCSRF_COOKIE_SECURE = TrueSESSION_COOKIE_HTTPONLY = TrueSESSION_COOKIE_SECURE = TrueHCAPTCHA_SITEKEY=''HCAPTCHA_SECRET=''
  2. Create the virtual environment and install dependencies:

    cd src/stationbookpython3.11 -m venv env&&source env/bin/activate&& pip install --upgrade pip&& pip install -r requirements.txt
  3. Prepare the database migration and apply it (checkDATABASE_URL insrc/stationbook/.env):

    python manage.py makemigrationspython manage.py migrate
  4. Create the super user:

    python manage.py createsuperuser
  5. Load the fixtures into the database:

    python manage.py loaddata book.json
  6. Run the test server:

    python manage.py runserver 0.0.0.0:8080

Docker

# Build the imagedocker build. -t stationbook:latest# Run the container (replace PATH_TO_MEDIA and PATH_TO_DB accordingly)docker run -d --restart always \--user$(id -u):$(id -g) \-p 8010:80 \-v PATH_TO_MEDIA:/data/stationbook/media \-v PATH_TO_DB:/data/stationbook/db \--name stationbook \stationbook:latest

FDSN data synchronization

Below code can be used to synchronize with the EIDA nodes. EIDA nodes can be configured manually using admin panel or loaded from the fixtures.

python3 fdsn_sync.py

To automate the synchronization process,/stationbook/src/stationbook/fdsn_sync.py can be executed via crontab:

# min   hour    day     month   weekday command0****cd /data/stationbook&& python fdsn_sync.py

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp