Weasyl is a social gallery website designed for artists, writers, musicians, and more to share their work with other artists and fans. We seek to bring the creative world together in one easy to use, friendly, community website.
Requirements:
- Docker
- docker compose (included with Docker on Windows and macOS)
Save https://pypi.weasyl.dev/02-weasyl-latest-staff.sql.gz into the containers/postgres/
directory.
This copies the sample configuration into the config
volume, and only needs to be done each time the volume is recreated or the sample configuration changes.
./wzl configure
./wzl migrate
./wzl assets
If the asset builder (build.js
) was modified, run ./wzl build build-assets
before ./wzl assets
.
Start Nginx in the background:
./wzl up -d nginx
Build and start the Weasyl web service and its dependencies:
./wzl up --build web
Tip
wzl
is a thin wrapper script for docker compose
. You can…
- start any service in the background by adding the
-d
(--detach
) flag - detach from all attached services by sending SIGHUP – run
pkill -x -HUP docker-compose
from another shell - reattach to any background service with
./wzl up service-name
- see logs for one or more background services with
./wzl logs
Weasyl should now be running at http://weasyl.localhost:8080/! Several accounts are already created for you with a default password of password
. Login as ikani
for director-level access, or see the contents of ./config/weasyl-staff.example.py for accounts with other permission levels.
To open psql and run queries against the database:
./wzl exec postgres psql -U weasyl
To run all tests:
./wzl test
To run only a specific module's tests, such as weasyl.test.test_api
:
./wzl test pytest -x weasyl.test.test_api
./wzl revision --autogenerate -m 'Revision summary'
If you have questions or get stuck, you can try talking to Weasyl project members in the project’s Gitter room.
If the website does not come up and ./wzl logs web
displays a stacktrace ending with PermissionError: [Errno 13] Permission denied: '/weasyl/storage/prometheus/histogram_16.db'
(or similar), run ./wzl down
followed by ./wzl up -d
.
Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.
When committing code, be sure to follow the Style and Best Practices Guide.