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
To build assets (subresources like static images, CSS, and JavaScript) once:
./wzl assets
To watch for changes and rebuild assets automatically without rebuilding any containers:
./wzl assets-watch
You’ll still need to stop and restart the watching process in order to apply changes to dependencies in deno.json or to build.ts.
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.
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.