Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/spraakbanken/skbl-portal
The flask application running the https://skbl.se web page
https://github.com/spraakbanken/skbl-portal
flask-application karp
Last synced: 5 days ago
JSON representation
The flask application running the https://skbl.se web page
- Host: GitHub
- URL: https://github.com/spraakbanken/skbl-portal
- Owner: spraakbanken
- License: mit
- Created: 2018-02-15T10:25:43.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-09-18T08:26:53.000Z (about 2 months ago)
- Last Synced: 2024-09-18T11:10:31.404Z (about 2 months ago)
- Topics: flask-application, karp
- Language: Python
- Homepage: https://skbl.se
- Size: 11.4 MB
- Stars: 4
- Watchers: 6
- Forks: 1
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-starred - spraakbanken/skbl-portal - The flask application running the https://skbl.se web page (others)
README
# SKBL.SE
## Run development
* Copy `skbl/config.default.cfg` to `skbl/config.cfg`
* Set KARP_AUTH_HASH to secret value (retrieved from another developer)
* Run `docker-compose up`
* Visit http://localhost:8080## Re-build container
docker-compose down
docker-compose build
docker-compose up## Extract, update and compile translations
docker-compose exec web pybabel extract -F babel.cfg -o skbl/translations/messages.pot .
docker-compose exec web pybabel update -i skbl/translations/messages.pot -d skbl/translationsAdd translations by modifying messages.po
If you don't have permission to modify messages.po run the following command:docker-compose exec web chmod -R 777 skbl/translations/sv/LC_MESSAGES/messages.po
Finally compile:
docker-compose exec web pybabel compile -d skbl/translations
## Installing memcached & co on server
Download and install libevent, memcached, libmemcached.
For example:./configure --prefix=/var/www/sites/dev.skbl.se/data/libevent
make
make test
make installFor memcached, run the config as below
```
./configure --prefix=/var/www/sites/dev.skbl.se/data/memcached --with-libevent=/var/www/sites/dev.skbl.se/data/libevent
```To get pylibmc to work with the locally installed libmemcached packages, run:
`LIBMEMCACHED=~/libmemcached/ pip install pylibmc`
Where `~/libmemcached/` is the path to your locally installed libmemcached.
If this does not work, try:
```
pip install --global-option=build_ext --global-option="-I/home/fkskbl/dev.skbl.se/data/libmemcached/include/" --global-option="-L/home/fkskbl/dev.skbl.se/data/libmemcached/lib" --global-option="-R/home/fkskbl/dev.skbl.se/data/libmemcached/lib" pylibmc
```### Running memcached
Unless you're using Docker, you need to start memcached on the server. If you're using [supervisor](http://supervisord.org/running.html),
add the following lines to your config (`/etc/supervisor.d/fkskbl.conf`):```
[program:memcached]
command=/path/to/installedmemcached/memcached/bin/memcached
-s /path/to/socketfile/memcached.sock
-v
-a 770
```Then run
`supervisorctl -c /etc/supervisord.d/fkskbl.conf update`
and
`supervisorctl -c /etc/supervisord.d/fkskbl.conf status`
to see that the process has started successfully.