Merge pull request #688 from arkhi/ci

Add .editorconfig files and global linting Github Workflow.
This commit is contained in:
Mouse Reeve 2021-03-20 16:09:37 -07:00 committed by GitHub
commit 014c2f108b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 383 additions and 302 deletions

View file

@ -1,2 +1,2 @@
[run]
omit = */test*,celerywyrm*,bookwyrm/migrations/*
omit = */test*,celerywyrm*,bookwyrm/migrations/*

View file

@ -4,4 +4,4 @@ __pycache__
*.pyd
.git
.github
.pytest*
.pytest*

31
.editorconfig Normal file
View file

@ -0,0 +1,31 @@
# @see https://editorconfig.org/
# top-most EditorConfig file
root = true
# Unix-style newlines with a newline ending every file
[*]
charset = utf-8
end_of_line = lf
indent_size = 4
indent_style = space
insert_final_newline = true
max_line_length = 100
# C-style doc comments
block_comment_start = /*
block_comment = *
block_comment_end = */
[{bw-dev,fr-dev,LICENSE}]
max_line_length = off
[*.{csv,json,html,md,po,py,svg,tsv}]
max_line_length = off
[*.{md,markdown}]
trim_trailing_whitespace = false
[*.{yml,yaml}]
indent_size = 2
max_line_length = off

View file

@ -24,15 +24,15 @@ A clear and concise description of what you expected to happen.
If applicable, add screenshots to help explain your problem.
**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]
**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]
**Additional context**
Add any other context about the problem here.

View file

@ -1,4 +1,4 @@
name: Lint
name: Lint Python
on: [push, pull_request]

21
.github/workflows/linters-global.yaml vendored Normal file
View file

@ -0,0 +1,21 @@
# @url https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions
name: Lint Project
on:
push:
branches: [ main, ci ]
pull_request:
branches: [ main, ci ]
jobs:
linters:
name: linters
runs-on: ubuntu-20.04
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- name: EditorConfig
uses: greut/eclint-action@v0

View file

@ -23,13 +23,13 @@ include:
Examples of unacceptable behavior by participants include:
* The use of sexualized language or imagery and unwelcome sexual attention or
advances
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting
professional setting
## Our Responsibilities

208
README.md
View file

@ -6,12 +6,12 @@ Social reading and reviewing, decentralized with ActivityPub
- [Joining BookWyrm](#joining-bookwyrm)
- [Contributing](#contributing)
- [About BookWyrm](#about-bookwyrm)
- [What it is and isn't](#what-it-is-and-isnt)
- [The role of federation](#the-role-of-federation)
- [Features](#features)
- [Setting up the developer environment](#setting-up-the-developer-environment)
- [Installing in Production](#installing-in-production)
- [Book data](#book-data)
- [What it is and isn't](#what-it-is-and-isnt)
- [The role of federation](#the-role-of-federation)
- [Features](#features)
- [Setting up the developer environment](#setting-up-the-developer-environment)
- [Installing in Production](#installing-in-production)
- [Book data](#book-data)
## Joining BookWyrm
BookWyrm is still a young piece of software, and isn't at the level of stability and feature-richness that you'd find in a production-ready application. But it does what it says on the box! If you'd like to join an instance, you can check out the [instances](https://github.com/mouse-reeve/bookwyrm/blob/main/instances.md) list.
@ -47,49 +47,49 @@ Federation makes it possible to have small, self-determining communities, in con
### Features
Since the project is still in its early stages, the features are growing every day, and there is plenty of room for suggestions and ideas. Open an [issue](https://github.com/mouse-reeve/bookwyrm/issues) to get the conversation going!
- Posting about books
- Posting about books
- Compose reviews, with or without ratings, which are aggregated in the book page
- Compose other kinds of statuses about books, such as:
- Comments on a book
- Quotes or excerpts
- Comments on a book
- Quotes or excerpts
- Reply to statuses
- View aggregate reviews of a book across connected BookWyrm instances
- Differentiate local and federated reviews and rating in your activity feed
- Track reading activity
- Track reading activity
- Shelve books on default "to-read," "currently reading," and "read" shelves
- Create custom shelves
- Store started reading/finished reading dates, as well as progress updates along the way
- Update followers about reading activity (optionally, and with granular privacy controls)
- Create lists of books which can be open to submissions from anyone, curated, or only edited by the creator
- Federation with ActivityPub
- Federation with ActivityPub
- Broadcast and receive user statuses and activity
- Share book data between instances to create a networked database of metadata
- Identify shared books across instances and aggregate related content
- Follow and interact with users across BookWyrm instances
- Inter-operate with non-BookWyrm ActivityPub services (currently, Mastodon is supported)
- Granular privacy controls
- Granular privacy controls
- Private, followers-only, and public privacy levels for posting, shelves, and lists
- Option for users to manually approve followers
- Allow blocking and flagging for moderation
### The Tech Stack
Web backend
- [Django](https://www.djangoproject.com/) web server
- [PostgreSQL](https://www.postgresql.org/) database
- [ActivityPub](http://activitypub.rocks/) federation
- [Celery](http://celeryproject.org/) task queuing
- [Redis](https://redis.io/) task backend
- [Django](https://www.djangoproject.com/) web server
- [PostgreSQL](https://www.postgresql.org/) database
- [ActivityPub](http://activitypub.rocks/) federation
- [Celery](http://celeryproject.org/) task queuing
- [Redis](https://redis.io/) task backend
Front end
- Django templates
- [Bulma.io](https://bulma.io/) css framework
- Vanilla JavaScript, in moderation
- Django templates
- [Bulma.io](https://bulma.io/) css framework
- Vanilla JavaScript, in moderation
Deployment
- [Docker](https://www.docker.com/) and docker-compose
- [Gunicorn](https://gunicorn.org/) web runner
- [Flower](https://github.com/mher/flower) celery monitoring
- [Nginx](https://nginx.org/en/) HTTP server
- [Docker](https://www.docker.com/) and docker-compose
- [Gunicorn](https://gunicorn.org/) web runner
- [Flower](https://github.com/mher/flower) celery monitoring
- [Nginx](https://nginx.org/en/) HTTP server
## Setting up the developer environment
@ -147,10 +147,10 @@ You can add the `-l <language code>` to only compile one language. When you refr
This project is still young and isn't, at the moment, very stable, so please proceed with caution when running in production.
### Server setup
- Get a domain name and set up DNS for your server
- Set your server up with appropriate firewalls for running a web application (this instruction set is tested against Ubuntu 20.04)
- Set up an email service (such as mailgun) and the appropriate SMTP/DNS settings
- Install Docker and docker-compose
- Get a domain name and set up DNS for your server
- Set your server up with appropriate firewalls for running a web application (this instruction set is tested against Ubuntu 20.04)
- Set up an email service (such as mailgun) and the appropriate SMTP/DNS settings
- Install Docker and docker-compose
### Install and configure BookWyrm
@ -158,37 +158,55 @@ The `production` branch of BookWyrm contains a number of tools not on the `main`
Instructions for running BookWyrm in production:
- Get the application code:
`git clone git@github.com:mouse-reeve/bookwyrm.git`
- Switch to the `production` branch
`git checkout production`
- Create your environment variables file
`cp .env.example .env`
- Add your domain, email address, SMTP credentials
- Set a secure redis password and secret key
- Set a secure database password for postgres
- Update your nginx configuration in `nginx/default.conf`
- Replace `your-domain.com` with your domain name
- If you aren't using the `www` subdomain, remove the www.your-domain.com version of the domain from the `server_name` in the first server block in `nginx/default.conf` and remove the `-d www.${DOMAIN}` flag at the end of the `certbot` command in `docker-compose.yml`.
- If you are running another web-server on your host machine, you will need to follow the [reverse-proxy instructions](#running-bookwyrm-behind-a-reverse-proxy)
- Run the application (this should also set up a Certbot ssl cert for your domain) with
`docker-compose up --build`, and make sure all the images build successfully
- Get the application code:
`git clone git@github.com:mouse-reeve/bookwyrm.git`
- Switch to the `production` branch
`git checkout production`
- Create your environment variables file
`cp .env.example .env`
- Add your domain, email address, SMTP credentials
- Set a secure redis password and secret key
- Set a secure database password for postgres
- Update your nginx configuration in `nginx/default.conf`
- Replace `your-domain.com` with your domain name
- Run the application (this should also set up a Certbot ssl cert for your domain) with
`docker-compose up --build`, and make sure all the images build successfully
- When docker has built successfully, stop the process with `CTRL-C`
- Comment out the `command: certonly...` line in `docker-compose.yml`
- Run docker-compose in the background with: `docker-compose up -d`
- Initialize the database with: `./bw-dev initdb`
- Set up schedule backups with cron that runs that `docker-compose exec db pg_dump -U <databasename>` and saves the backup to a safe location
- Get the application code:
`git clone git@github.com:mouse-reeve/bookwyrm.git`
- Switch to the `production` branch
`git checkout production`
- Create your environment variables file
`cp .env.example .env`
- Add your domain, email address, SMTP credentials
- Set a secure redis password and secret key
- Set a secure database password for postgres
- Update your nginx configuration in `nginx/default.conf`
- Replace `your-domain.com` with your domain name
- If you aren't using the `www` subdomain, remove the www.your-domain.com version of the domain from the `server_name` in the first server block in `nginx/default.conf` and remove the `-d www.${DOMAIN}` flag at the end of the `certbot` command in `docker-compose.yml`.
- If you are running another web-server on your host machine, you will need to follow the [reverse-proxy instructions](#running-bookwyrm-behind-a-reverse-proxy)
- Run the application (this should also set up a Certbot ssl cert for your domain) with
`docker-compose up --build`, and make sure all the images build successfully
- If you are running other services on your host machine, you may run into errors where services fail when attempting to bind to a port.
See the [troubleshooting guide](#port-conflicts) for advice on resolving this.
- When docker has built successfully, stop the process with `CTRL-C`
- Comment out the `command: certonly...` line in `docker-compose.yml`, and uncomment the following line (`command: renew ...`) so that the certificate will be automatically renewed.
- Uncomment the https redirect and `server` block in `nginx/default.conf` (lines 17-48).
- Run docker-compose in the background with: `docker-compose up -d`
- Initialize the database with: `./bw-dev initdb`
- When docker has built successfully, stop the process with `CTRL-C`
- Comment out the `command: certonly...` line in `docker-compose.yml`, and uncomment the following line (`command: renew ...`) so that the certificate will be automatically renewed.
- Uncomment the https redirect and `server` block in `nginx/default.conf` (lines 17-48).
- Run docker-compose in the background with: `docker-compose up -d`
- Initialize the database with: `./bw-dev initdb`
Congrats! You did it, go to your domain and enjoy the fruits of your labors.
### Configure your instance
- Register a user account in the application UI
- Make your account a superuser (warning: do *not* use django's `createsuperuser` command)
- On your server, open the django shell
- Register a user account in the application UI
- Make your account a superuser (warning: do *not* use django's `createsuperuser` command)
- On your server, open the django shell
`./bw-dev shell`
- Load your user and make it a superuser
- Load your user and make it a superuser
```python
from bookwyrm import models
user = models.User.objects.get(id=1)
@ -196,17 +214,17 @@ Congrats! You did it, go to your domain and enjoy the fruits of your labors.
user.is_superuser = True
user.save()
```
- Go to the site settings (`/settings/site-settings` on your domain) and configure your instance name, description, code of conduct, and toggle whether registration is open on your instance
- Go to the site settings (`/settings/site-settings` on your domain) and configure your instance name, description, code of conduct, and toggle whether registration is open on your instance
## Book data
The application is set up to share book and author data between instances, and get book data from arbitrary outside sources. Right now, the only connector is to OpenLibrary, but other connectors could be written.
There are three concepts in the book data model:
- `Book`, an abstract, high-level concept that could mean either a `Work` or an `Edition`. No data is saved as a `Book`, it serves as shared model for `Work` and `Edition`
- `Work`, the theoretical umbrella concept of a book that encompasses every edition of the book, and
- `Edition`, a concrete, actually published version of a book
- `Book`, an abstract, high-level concept that could mean either a `Work` or an `Edition`. No data is saved as a `Book`, it serves as shared model for `Work` and `Edition`
- `Work`, the theoretical umbrella concept of a book that encompasses every edition of the book, and
- `Edition`, a concrete, actually published version of a book
Whenever a user interacts with a book, they are interacting with a specific edition. Every work has a default edition, but the user can select other editions. Reviews aggregated for all editions of a work when you view an edition's page.
### Backups
@ -216,12 +234,12 @@ Backups are named `backup__%Y-%m-%d.sql`.
The db service has an optional script for periodically pruning the backups directory so that all recent daily backups are kept, but for older backups, only weekly or monthly backups are kept.
To enable this script:
- Uncomment the final line in `postgres-docker/cronfile`
- rebuild your instance `docker-compose up --build`
- Uncomment the final line in `postgres-docker/cronfile`
- rebuild your instance `docker-compose up --build`
You can copy backups from the backups volume to your host machine with `docker cp`:
- Run `docker-compose ps` to confirm the db service's full name (it's probably `bookwyrm_db_1`.
- Run `docker cp <container_name>:/backups <host machine path>`
- Run `docker-compose ps` to confirm the db service's full name (it's probably `bookwyrm_db_1`.
- Run `docker cp <container_name>:/backups <host machine path>`
### Port Conflicts
@ -230,15 +248,15 @@ This means that, depending on what else you are running on your host machine, yo
If this occurs, you will need to change your configuration to run services on different ports.
This may require one or more changes the following files:
- `docker-compose.yml`
- `nginx/default.conf`
- `.env` (You create this file yourself during setup)
- `docker-compose.yml`
- `nginx/default.conf`
- `.env` (You create this file yourself during setup)
E.g., If you need Redis to run on a different port:
- In `docker-compose.yml`:
- In `docker-compose.yml`:
- In `services` -> `redis` -> `command`, add `--port YOUR_PORT` to the command
- In `services` -> `redis` -> `ports`, change `6379:6379` to your port
- In `.env`, update `REDIS_PORT`
- In `.env`, update `REDIS_PORT`
If you are already running a web-server on your machine, you will need to set up a reverse-proxy.
@ -250,11 +268,11 @@ The default BookWyrm configuration already has an nginx server that proxies requ
The static files are stored in a Docker volume that several BookWyrm services access, so it is not recommended to remove this server completely.
To run BookWyrm behind a reverse-proxy, make the following changes:
- In `nginx/default.conf`:
- In `nginx/default.conf`:
- Comment out the two default servers
- Uncomment the server labeled Reverse-Proxy server
- Replace `your-domain.com` with your domain name
- In `docker-compose.yml`:
- In `docker-compose.yml`:
- In `services` -> `nginx` -> `ports`, comment out the default ports and add `- 8001:8001`
- In `services` -> `nginx` -> `volumes`, comment out the two volumes that begin `./certbot/`
- In `services`, comment out the `certbot` service
@ -270,35 +288,35 @@ Before you can set up nginx, you will need to locate your nginx configuration di
See [nginx's guide](http://nginx.org/en/docs/beginners_guide.html) for details.
To set up your server:
- In you `nginx.conf` file, ensure that `include servers/*;` isn't commented out.
- In your nginx `servers` directory, create a new file named after your domain containing the following information:
```nginx
server {
server_name your-domain.com www.your-domain.com;
- In you `nginx.conf` file, ensure that `include servers/*;` isn't commented out.
- In your nginx `servers` directory, create a new file named after your domain containing the following information:
```nginx
server {
server_name your-domain.com www.your-domain.com;
location / {
proxy_pass http://localhost:8000;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
}
location / {
proxy_pass http://localhost:8000;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
}
location /images/ {
proxy_pass http://localhost:8001;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
}
location /images/ {
proxy_pass http://localhost:8001;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
}
location /static/ {
proxy_pass http://localhost:8001;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
}
location /static/ {
proxy_pass http://localhost:8001;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
}
listen [::]:80 ssl;
listen 80 ssl;
}
```
- run `sudo certbot run --nginx --email YOUR_EMAIL -d your-domain.com -d www.your-domain.com`
- restart nginx
listen [::]:80 ssl;
listen 80 ssl;
}
```
- run `sudo certbot run --nginx --email YOUR_EMAIL -d your-domain.com -d www.your-domain.com`
- restart nginx
If everything worked correctly, your BookWyrm instance should now be externally accessible.
If everything worked correctly, your BookWyrm instance should now be externally accessible.

View file

@ -0,0 +1,4 @@
# @see https://editorconfig.org/
[*.svg]
insert_final_newline = unset

View file

@ -70,8 +70,8 @@ html {
content: '\e9d9';
}
.form-rate-stars label.icon:hover:before {
content: '\e9d9';
}
content: '\e9d9';
}
.form-rate-stars label.icon:hover ~ label.icon:before{
content: '\e9d7';
}

View file

@ -1,153 +1,153 @@
@font-face {
font-family: 'icomoon';
src: url('fonts/icomoon.eot?n5x55');
src: url('fonts/icomoon.eot?n5x55#iefix') format('embedded-opentype'),
url('fonts/icomoon.ttf?n5x55') format('truetype'),
url('fonts/icomoon.woff?n5x55') format('woff'),
url('fonts/icomoon.svg?n5x55#icomoon') format('svg');
font-weight: normal;
font-style: normal;
font-display: block;
font-family: 'icomoon';
src: url('fonts/icomoon.eot?n5x55');
src: url('fonts/icomoon.eot?n5x55#iefix') format('embedded-opentype'),
url('fonts/icomoon.ttf?n5x55') format('truetype'),
url('fonts/icomoon.woff?n5x55') format('woff'),
url('fonts/icomoon.svg?n5x55#icomoon') format('svg');
font-weight: normal;
font-style: normal;
font-display: block;
}
[class^="icon-"], [class*=" icon-"] {
/* use !important to prevent issues with browser extensions that change fonts */
font-family: 'icomoon' !important;
speak: never;
font-style: normal;
font-weight: normal;
font-variant: normal;
text-transform: none;
line-height: 1;
/* use !important to prevent issues with browser extensions that change fonts */
font-family: 'icomoon' !important;
speak: never;
font-style: normal;
font-weight: normal;
font-variant: normal;
text-transform: none;
line-height: 1;
/* Better Font Rendering =========== */
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
/* Better Font Rendering =========== */
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.icon-graphic-heart:before {
content: "\e91e";
content: "\e91e";
}
.icon-graphic-paperplane:before {
content: "\e91f";
content: "\e91f";
}
.icon-graphic-banknote:before {
content: "\e920";
content: "\e920";
}
.icon-stars:before {
content: "\e91a";
content: "\e91a";
}
.icon-warning:before {
content: "\e91b";
content: "\e91b";
}
.icon-book:before {
content: "\e900";
content: "\e900";
}
.icon-bookmark:before {
content: "\e91c";
content: "\e91c";
}
.icon-rss:before {
content: "\e91d";
content: "\e91d";
}
.icon-envelope:before {
content: "\e901";
content: "\e901";
}
.icon-arrow-right:before {
content: "\e902";
content: "\e902";
}
.icon-bell:before {
content: "\e903";
content: "\e903";
}
.icon-x:before {
content: "\e904";
content: "\e904";
}
.icon-quote-close:before {
content: "\e905";
content: "\e905";
}
.icon-quote-open:before {
content: "\e906";
content: "\e906";
}
.icon-image:before {
content: "\e907";
content: "\e907";
}
.icon-pencil:before {
content: "\e908";
content: "\e908";
}
.icon-list:before {
content: "\e909";
content: "\e909";
}
.icon-unlock:before {
content: "\e90a";
content: "\e90a";
}
.icon-unlisted:before {
content: "\e90a";
content: "\e90a";
}
.icon-globe:before {
content: "\e90b";
content: "\e90b";
}
.icon-public:before {
content: "\e90b";
content: "\e90b";
}
.icon-lock:before {
content: "\e90c";
content: "\e90c";
}
.icon-followers:before {
content: "\e90c";
content: "\e90c";
}
.icon-chain-broken:before {
content: "\e90d";
content: "\e90d";
}
.icon-chain:before {
content: "\e90e";
content: "\e90e";
}
.icon-comments:before {
content: "\e90f";
content: "\e90f";
}
.icon-comment:before {
content: "\e910";
content: "\e910";
}
.icon-boost:before {
content: "\e911";
content: "\e911";
}
.icon-arrow-left:before {
content: "\e912";
content: "\e912";
}
.icon-arrow-up:before {
content: "\e913";
content: "\e913";
}
.icon-arrow-down:before {
content: "\e914";
content: "\e914";
}
.icon-home:before {
content: "\e915";
content: "\e915";
}
.icon-local:before {
content: "\e916";
content: "\e916";
}
.icon-dots-three:before {
content: "\e917";
content: "\e917";
}
.icon-check:before {
content: "\e918";
content: "\e918";
}
.icon-dots-three-vertical:before {
content: "\e919";
content: "\e919";
}
.icon-search:before {
content: "\e986";
content: "\e986";
}
.icon-star-empty:before {
content: "\e9d7";
content: "\e9d7";
}
.icon-star-half:before {
content: "\e9d8";
content: "\e9d8";
}
.icon-star-full:before {
content: "\e9d9";
content: "\e9d9";
}
.icon-heart:before {
content: "\e9da";
content: "\e9da";
}
.icon-plus:before {
content: "\ea0a";
content: "\ea0a";
}

View file

@ -59,7 +59,9 @@ class TabGroup {
}
initPanels() {
let selectedPanelId = this.tablist.querySelector('[role="tab"][aria-selected="true"]').getAttribute("aria-controls");
let selectedPanelId = this.tablist
.querySelector('[role="tab"][aria-selected="true"]')
.getAttribute("aria-controls");
for(let panel of this.panels) {
if(panel.getAttribute("id") !== selectedPanelId) {
panel.setAttribute("hidden", "");

View file

@ -11,16 +11,16 @@
{% csrf_token %}
<label class="label" for="source">
<p>{% trans "Data source" %}</p>
<p>{% trans "Data source" %}</p>
<div class="select {{ class }}">
<select name="source" id="source">
<option value="GoodReads" {% if current == 'GoodReads' %}selected{% endif %}>
GoodReads
</option>
<option value="LibraryThing" {% if current == 'LibraryThing' %}selected{% endif %}>
LibraryThing
</option>
</select>
<select name="source" id="source">
<option value="GoodReads" {% if current == 'GoodReads' %}selected{% endif %}>
GoodReads
</option>
<option value="LibraryThing" {% if current == 'LibraryThing' %}selected{% endif %}>
LibraryThing
</option>
</select>
</div>
</label>

View file

@ -7,9 +7,14 @@
<div class="field has-addons mb-0">
<div class="control">
<input
aria-label="{% if readthrough.progress_mode == 'PG' %}Current page{% else %}Percent read{% endif %}"
class="input is-small" type="number" min="0"
name="progress" size="3" value="{{ readthrough.progress|default:'' }}">
class="input is-small"
type="number"
name="progress"
value="{{ readthrough.progress|default:'' }}"
min="0"
size="3"
aria-label="{% if readthrough.progress_mode == 'PG' %}Current page{% else %}Percent read{% endif %}"
/>
</div>
<div class="control select is-small">
<select name="progress_mode" aria-label="Progress mode">

View file

@ -1,45 +1,45 @@
{
"ISBN:9782070427796": {
"url": "https://openlibrary.org/books/OL16262504M/Les_ombres_errantes",
"key": "/books/OL16262504M",
"title": "Les ombres errantes",
"authors": [
{
"url": "https://openlibrary.org/authors/OL269675A/Pascal_Quignard",
"name": "Pascal Quignard"
}
],
"by_statement": "Pascal Quignard.",
"identifiers": {
"goodreads": [
"1835483"
],
"librarything": [
"983474"
],
"isbn_10": [
"207042779X"
],
"openlibrary": [
"OL16262504M"
]
},
"classifications": {
"dewey_decimal_class": [
"848/.91403"
]
},
"publishers": [
{
"name": "Gallimard"
}
],
"publish_places": [
{
"name": "Paris"
}
],
"publish_date": "2002",
"notes": "Hardback published Grasset, 2002."
}
"ISBN:9782070427796": {
"url": "https://openlibrary.org/books/OL16262504M/Les_ombres_errantes",
"key": "/books/OL16262504M",
"title": "Les ombres errantes",
"authors": [
{
"url": "https://openlibrary.org/authors/OL269675A/Pascal_Quignard",
"name": "Pascal Quignard"
}
],
"by_statement": "Pascal Quignard.",
"identifiers": {
"goodreads": [
"1835483"
],
"librarything": [
"983474"
],
"isbn_10": [
"207042779X"
],
"openlibrary": [
"OL16262504M"
]
},
"classifications": {
"dewey_decimal_class": [
"848/.91403"
]
},
"publishers": [
{
"name": "Gallimard"
}
],
"publish_places": [
{
"name": "Paris"
}
],
"publish_date": "2002",
"notes": "Hardback published Grasset, 2002."
}
}

View file

@ -1,79 +1,79 @@
version: '3'
services:
nginx:
image: nginx:latest
ports:
- 1333:80
depends_on:
- web
networks:
- main
volumes:
- ./nginx:/etc/nginx/conf.d
- static_volume:/app/static
- media_volume:/app/images
db:
image: postgres
env_file: .env
volumes:
- pgdata:/var/lib/postgresql/data
networks:
- main
web:
build: .
env_file: .env
command: python manage.py runserver 0.0.0.0:8000
volumes:
- .:/app
- static_volume:/app/static
- media_volume:/app/images
depends_on:
- db
- celery_worker
networks:
- main
ports:
- 8000:8000
redis:
image: redis
env_file: .env
ports:
- 6379:6379
networks:
- main
restart: on-failure
celery_worker:
env_file: .env
build: .
networks:
- main
command: celery -A celerywyrm worker -l info
volumes:
- .:/app
- static_volume:/app/static
- media_volume:/app/images
depends_on:
- db
- redis
restart: on-failure
flower:
build: .
command: flower --port=8888
env_file: .env
environment:
- CELERY_BROKER_URL=${CELERY_BROKER}
networks:
- main
depends_on:
- db
- redis
restart: on-failure
ports:
- 8888:8888
nginx:
image: nginx:latest
ports:
- 1333:80
depends_on:
- web
networks:
- main
volumes:
- ./nginx:/etc/nginx/conf.d
- static_volume:/app/static
- media_volume:/app/images
db:
image: postgres
env_file: .env
volumes:
- pgdata:/var/lib/postgresql/data
networks:
- main
web:
build: .
env_file: .env
command: python manage.py runserver 0.0.0.0:8000
volumes:
- .:/app
- static_volume:/app/static
- media_volume:/app/images
depends_on:
- db
- celery_worker
networks:
- main
ports:
- 8000:8000
redis:
image: redis
env_file: .env
ports:
- 6379:6379
networks:
- main
restart: on-failure
celery_worker:
env_file: .env
build: .
networks:
- main
command: celery -A celerywyrm worker -l info
volumes:
- .:/app
- static_volume:/app/static
- media_volume:/app/images
depends_on:
- db
- redis
restart: on-failure
flower:
build: .
command: flower --port=8888
env_file: .env
environment:
- CELERY_BROKER_URL=${CELERY_BROKER}
networks:
- main
depends_on:
- db
- redis
restart: on-failure
ports:
- 8888:8888
volumes:
pgdata:
static_volume:
media_volume:
pgdata:
static_volume:
media_volume:
networks:
main:
main: