Skip to content

Commit

Permalink
Bump deps + Adding Docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Mirio committed Oct 18, 2023
1 parent b0e79f7 commit 8252dea
Show file tree
Hide file tree
Showing 6 changed files with 111 additions and 20 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ With VerbaCap is a **Podcast Manager** you will be able to download and listen t
It uses [_Django_](https://www.djangoproject.com/) in order to create a new integration for the platform as easy as possible. Below a quick platform integrated and the current status.

:heavy_check_mark: Youtube Channel :heavy_check_mark: Youtube Playlist

:heavy_check_mark: Spreaker.com

:construction: Apple Podcast :construction: Amazon Music

[Installation](docs/install.md)[Configuration](docs/config.md)
Expand Down
51 changes: 51 additions & 0 deletions compose-demo.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
version: "3.8"

services:
redis:
image: docker.io/redis:7-alpine
restart: always
container_name: verbacap-redis

psql:
image: docker.io/postgres:15-alpine
restart: always
container_name: verbacap-psql
environment:
POSTGRES_PASSWORD: "changeme"
volumes:
- ./example/psql:/var/lib/postgresql/data

web:
image: ghcr.io/mirio/verbacap:v1.0.0
restart: always
container_name: verbacap-web
command: "run"
ports:
- 8080:8080
depends_on:
- redis
- psql
environment:
DATABASE_URL: "postgres://postgres:changeme@verbacap-psql:5432/postgres"
DJANGO_SECRET_KEY: "Chang4M4"
DJANGO_DEBUG: "False"
CELERY_BROKER_URL: "redis://verbacap-redis:6379/0"
PERSIST_AUDIO_ROOTDIR: "/persist"
volumes:
- ./example/web:/persist

celery:
image: ghcr.io/mirio/verbacap:v1.0.0
restart: always
container_name: verbacap-celery
command: "celery"
depends_on:
- web
environment:
DATABASE_URL: "postgres://postgres:changeme@verbacap-psql:5432/postgres"
DJANGO_SECRET_KEY: "Chang4M4"
DJANGO_DEBUG: "False"
CELERY_BROKER_URL: "redis://verbacap-redis:6379/0"
PERSIST_AUDIO_ROOTDIR: "/persist"
volumes:
- ./example/web:/persist
22 changes: 6 additions & 16 deletions compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,6 @@ services:
restart: always
container_name: verbacap-redis

psql:
image: docker.io/postgres:15-alpine
restart: always
container_name: verbacap-psql
environment:
POSTGRES_PASSWORD: "changeme"
volumes:
- ./example/psql:/var/lib/postgresql/data

web:
image: ghcr.io/mirio/verbacap:v1.0.0
restart: always
Expand All @@ -24,15 +15,14 @@ services:
- 8080:8080
depends_on:
- redis
- psql
environment:
DATABASE_URL: "postgres://postgres:changeme@verbacap-psql:5432/postgres"
DJANGO_SECRET_KEY: "Chang4M4"
DATABASE_URL: "postgres://POSTGRES_USERNAME:POSTGRES_PASSWORD@POSTGRES_HOSTNAME:5432/postgres"
DJANGO_SECRET_KEY: "CHANGEME_SECRET"
DJANGO_DEBUG: "False"
CELERY_BROKER_URL: "redis://verbacap-redis:6379/0"
PERSIST_AUDIO_ROOTDIR: "/persist"
volumes:
- ./example/web:/persist
- CHANGEME_PERSIST_PATH:/persist

celery:
image: ghcr.io/mirio/verbacap:v1.0.0
Expand All @@ -42,10 +32,10 @@ services:
depends_on:
- web
environment:
DATABASE_URL: "postgres://postgres:changeme@verbacap-psql:5432/postgres"
DJANGO_SECRET_KEY: "Chang4M4"
DATABASE_URL: "postgres://POSTGRES_USERNAME:POSTGRES_PASSWORD@POSTGRES_HOSTNAME:5432/postgres"
DJANGO_SECRET_KEY: "CHANGEME_SECRET"
DJANGO_DEBUG: "False"
CELERY_BROKER_URL: "redis://verbacap-redis:6379/0"
PERSIST_AUDIO_ROOTDIR: "/persist"
volumes:
- ./example/web:/persist
- CHANGEME_PERSIST_PATH:/persist
11 changes: 11 additions & 0 deletions docs/config.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
## Environment Variables

| Variables | Default | Example | Description |
| :--------------------------: | :-----------------------: | :------------: |:--------------------------------------------: |
| DATABASE_URL | | postgres://user:password@localhost:5432/verbacap | Full Database URL |
| DJANGO_SECRET_KEY | | AAAaaaA51ag9A | A secret key for a particular Django installation. This is used to provide cryptographic signing, and should be set to a unique, unpredictable value. |
| DJANGO_DEBUG | False | True | A boolean that turns on/off debug mode. |
| CELERY_BROKER_URL | | redis://verbacap-redis:6379/0 | Redis URL for store a celery data |
| PERSIST_AUDIO_ROOTDIR | /persist/audio | /persist/audio | Persist Path to store the audio files |
| DJANGO_ACCOUNT_ALLOW_REGISTRATION | False | False | A boolean that turns on/off the user registration. |
| DJANGO_ALLOWED_HOSTS | example.com | example.com | Django Allowed Hosts separated by comma |
37 changes: 37 additions & 0 deletions docs/install.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
## Requirements
* Postgres 15+
* Docker / Podman / ContainerD
* HDD/SSD 2Gb +

## Install on Docker like daemon
1. Create a new user and assign full permission to the database in Postgres

2. Install `docker` and `docker-compose` ([More Info](https://docs.docker.com/engine/install/))

3. Edit the `compose.yaml` and change:
* `POSTGRES_USERNAME` = Insert the username for PostGres
* `POSTGRES_PASSWORD` = Insert the password for PostGres
* `POSTGRES_HOSTNAME` = Insert the hostname for PostGres
* `CHANGEME_PERSIST_PATH` = Insert the LOCAL path to persist the data like the audio files and temporary files
* `CHANGEME_SECRET` = Generate a random secret for the hashing/salting functions

4. Start the containers
```
docker compose up -d
```

5. Wait until the container is ready
```
docker logs -f verbacap-web
```
Wait until you can see `Listening at: http://0.0.0.0:8000`

6. Create a super admin user using:
```
docker exec -it verbacap-web /entrypoint.bash createadminuser
```
Insert the user and password of the super admin

7. Open your browser to [http://127.0.0.1:8080/](http://127.0.0.1:8080/)

8. Login with the super admin credential
8 changes: 4 additions & 4 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ python-slugify==8.0.1 # https://github.com/un33k/python-slugify
Pillow==10.0.1 # https://github.com/python-pillow/Pillow
rcssmin==1.1.1 # https://github.com/ndparker/rcssmin
argon2-cffi==23.1.0 # https://github.com/hynek/argon2_cffi
whitenoise==6.5.0 # https://github.com/evansd/whitenoise
whitenoise==6.6.0 # https://github.com/evansd/whitenoise
redis==5.0.1 # https://github.com/redis/redis-py
hiredis==2.2.3 # https://github.com/redis/hiredis-py
celery==5.3.4 # pyup: < 6.0 # https://github.com/celery/celery
Expand All @@ -14,13 +14,13 @@ django==4.2.6 # pyup: < 5.0 # https://www.djangoproject.com/
django-environ==0.11.2 # https://github.com/joke2k/django-environ
django-model-utils==4.3.1 # https://github.com/jazzband/django-model-utils
django-allauth==0.55.2 # https://github.com/pennersr/django-allauth
django-crispy-forms==2.0 # https://github.com/django-crispy-forms/django-crispy-forms
django-crispy-forms==2.1 # https://github.com/django-crispy-forms/django-crispy-forms
crispy-bootstrap5==0.7 # https://github.com/django-crispy-forms/crispy-bootstrap5
django-compressor==4.4 # https://github.com/django-compressor/django-compressor
django-redis==5.4.0 # https://github.com/jazzband/django-redis
# Django REST Framework
djangorestframework==3.14.0 # https://github.com/encode/django-rest-framework
django-cors-headers==4.2.0 # https://github.com/adamchainz/django-cors-headers
django-cors-headers==4.3.0 # https://github.com/adamchainz/django-cors-headers
# DRF-spectacular for api documentation
drf-spectacular==0.26.5 # https://github.com/tfranzel/drf-spectacular
Werkzeug[watchdog]==3.0.0 # https://github.com/pallets/werkzeug
Expand All @@ -43,7 +43,7 @@ coverage==7.3.2 # https://github.com/nedbat/coveragepy
black==23.9.1 # https://github.com/psf/black
djlint==1.34.0 # https://github.com/Riverside-Healthcare/djLint
pylint-django==2.5.3 # https://github.com/PyCQA/pylint-django
pre-commit==3.4.0 # https://github.com/pre-commit/pre-commit
pre-commit==3.5.0 # https://github.com/pre-commit/pre-commit

# Django
# ------------------------------------------------------------------------------
Expand Down

0 comments on commit 8252dea

Please sign in to comment.