Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/strykeforce/strykeforce.org
Stryke Force Web Site
https://github.com/strykeforce/strykeforce.org
frc website
Last synced: about 2 months ago
JSON representation
Stryke Force Web Site
- Host: GitHub
- URL: https://github.com/strykeforce/strykeforce.org
- Owner: strykeforce
- Created: 2018-04-30T18:10:56.000Z (over 6 years ago)
- Default Branch: main
- Last Pushed: 2024-04-19T16:48:04.000Z (9 months ago)
- Last Synced: 2024-04-20T17:15:36.002Z (9 months ago)
- Topics: frc, website
- Language: Python
- Homepage: https://www.strykeforce.org
- Size: 80 MB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# strykeforce.org
## Copy or restore production data
To restore database from backup, assumes `rclone` and `aws` credential files in place:
```sql
-- create schema in database strykeforce
CREATE ROLE "strykeforce";
CREATE SCHEMA IF NOT EXISTS "strykeforce" AUTHORIZATION "strykeforce";
``````sh
# data
aws s3 cp s3://www.strykeforce.org/sql/strykeforce.sql.gz .
zcat strykeforce.sql.gz | psql -d strykeforce# images and documents
rclone -v sync s3://www.strykeforce.org/media/ ./media
./manage.py wagtail_update_image_renditions
```
## Server ManagementIn production, look up the deployed derivation using `systemctl cat
strykeforce-website` and run `manage.py` as user `strykeforce` with required
environment variable set:```
sudo -u strykeforce env \
DJANGO_SETTINGS_MODULE=website.settings.production \
TBA_READ_KEY= \
SECRET_KEY= \
$NIX_STORE_PATH/bin/manage.py
```## Testing NixOS module in Container
```
sudo nixos-container create flake-test --flake .
sudo nixos-container start flake-test
sudo nixos-container root-login flake-test
sudo nixos-container destroy flake-test
```## Override python build configs temporarily
```nix
overrides = poetry2nixPkgs.defaultPoetryOverrides.extend
(self: super: {
opencv-python = super.opencv4;# keep until https://github.com/nix-community/poetry2nix/pull/1602 merged
sqlparse = super.sqlparse.overridePythonAttrs (old: {
buildInputs = (lists.remove super.flit-core old.buildInputs) ++ [ super.hatchling ];
});
});# ...
website = mkPoetryApplication {
inherit overrides;
# ...
```