docs: remove default password for docker-compose, improve instructions

This commit is contained in:
Jens Langhammer 2020-09-14 22:54:25 +02:00
parent b3262e2a82
commit 3bbded3555
5 changed files with 29 additions and 14 deletions

View File

@ -93,6 +93,9 @@ jobs:
- uses: actions/checkout@v1 - uses: actions/checkout@v1
- name: Run test suite in final docker images - name: Run test suite in final docker images
run: | run: |
sudo apt-get install -y pwgen
echo "PG_PASS=$(pwgen 40 1)" >> .env
echo "PASSBOOK_SECRET_KEY=$(pwgen 50 1)" >> .env
docker-compose pull -q docker-compose pull -q
docker-compose up --no-start docker-compose up --no-start
docker-compose start postgresql redis docker-compose start postgresql redis

View File

@ -13,7 +13,10 @@ jobs:
- uses: actions/checkout@master - uses: actions/checkout@master
- name: Pre-release test - name: Pre-release test
run: | run: |
export PASSBOOK_TAG=latest sudo apt-get install -y pwgen
echo "PASSBOOK_TAG=latest" >> .env
echo "PG_PASS=$(pwgen 40 1)" >> .env
echo "PASSBOOK_SECRET_KEY=$(pwgen 50 1)" >> .env
docker-compose pull -q docker-compose pull -q
docker build \ docker build \
--no-cache \ --no-cache \

View File

@ -14,6 +14,8 @@ services:
- POSTGRES_DB=passbook - POSTGRES_DB=passbook
labels: labels:
- traefik.enable=false - traefik.enable=false
env_file:
- .env
redis: redis:
image: redis image: redis
networks: networks:
@ -25,9 +27,8 @@ services:
command: server command: server
environment: environment:
PASSBOOK_REDIS__HOST: redis PASSBOOK_REDIS__HOST: redis
PASSBOOK_ERROR_REPORTING: ${PASSBOOK_ERROR_REPORTING:-false}
PASSBOOK_POSTGRESQL__HOST: postgresql PASSBOOK_POSTGRESQL__HOST: postgresql
PASSBOOK_POSTGRESQL__PASSWORD: ${PG_PASS:-thisisnotagoodpassword} PASSBOOK_POSTGRESQL__PASSWORD: ${PG_PASS}
PASSBOOK_LOG_LEVEL: debug PASSBOOK_LOG_LEVEL: debug
ports: ports:
- 8000 - 8000
@ -37,6 +38,8 @@ services:
- traefik.port=8000 - traefik.port=8000
- traefik.docker.network=internal - traefik.docker.network=internal
- traefik.frontend.rule=PathPrefix:/ - traefik.frontend.rule=PathPrefix:/
env_file:
- .env
worker: worker:
image: beryju/passbook:${PASSBOOK_TAG:-0.10.0-stable} image: beryju/passbook:${PASSBOOK_TAG:-0.10.0-stable}
command: worker command: worker
@ -46,10 +49,11 @@ services:
- traefik.enable=false - traefik.enable=false
environment: environment:
PASSBOOK_REDIS__HOST: redis PASSBOOK_REDIS__HOST: redis
PASSBOOK_ERROR_REPORTING: ${PASSBOOK_ERROR_REPORTING:-false}
PASSBOOK_POSTGRESQL__HOST: postgresql PASSBOOK_POSTGRESQL__HOST: postgresql
PASSBOOK_POSTGRESQL__PASSWORD: ${PG_PASS:-thisisnotagoodpassword} PASSBOOK_POSTGRESQL__PASSWORD: ${PG_PASS}
PASSBOOK_LOG_LEVEL: debug PASSBOOK_LOG_LEVEL: debug
env_file:
- .env
static: static:
image: beryju/passbook-static:${PASSBOOK_TAG:-0.10.0-stable} image: beryju/passbook-static:${PASSBOOK_TAG:-0.10.0-stable}
networks: networks:

View File

@ -11,14 +11,21 @@ This installation method is for test-setups and small-scale productive setups.
Download the latest `docker-compose.yml` from [here](https://raw.githubusercontent.com/BeryJu/passbook/master/docker-compose.yml). Place it in a directory of your choice. Download the latest `docker-compose.yml` from [here](https://raw.githubusercontent.com/BeryJu/passbook/master/docker-compose.yml). Place it in a directory of your choice.
To optionally enable error-reporting, run `echo PASSBOOK_ERROR_REPORTING=true >> .env`
To optionally deploy a different version run `echo PASSBOOK_TAG=0.10.0-stable >> .env`
If this is a fresh passbook install run the following commands to generate a password:
```
sudo apt-get install -y pwgen
echo "PG_PASS=$(pwgen 40 1)" >> .env
echo "PASSBOOK_SECRET_KEY=$(pwgen 50 1)" >> .env
```
Afterwards, run these commands to finish
``` ```
wget https://raw.githubusercontent.com/BeryJu/passbook/master/docker-compose.yml
# Optionally enable Error-reporting
# export PASSBOOK_ERROR_REPORTING=true
# Optionally deploy a different version
# export PASSBOOK_TAG=0.10.0-stable
# If this is a productive installation, set a different PostgreSQL Password
# export PG_PASS=$(pwgen 40 1)
docker-compose pull docker-compose pull
docker-compose up -d docker-compose up -d
docker-compose run --rm server migrate docker-compose run --rm server migrate

View File

@ -1,12 +1,10 @@
"""flow views tests""" """flow views tests"""
from json import loads
from unittest.mock import MagicMock, PropertyMock, patch from unittest.mock import MagicMock, PropertyMock, patch
from django.shortcuts import reverse from django.shortcuts import reverse
from django.test import Client, TestCase from django.test import Client, TestCase
from django.utils.encoding import force_str from django.utils.encoding import force_str
from passbook.flows.exceptions import EmptyFlowException, FlowNonApplicableException
from passbook.flows.markers import ReevaluateMarker, StageMarker from passbook.flows.markers import ReevaluateMarker, StageMarker
from passbook.flows.models import Flow, FlowDesignation, FlowStageBinding from passbook.flows.models import Flow, FlowDesignation, FlowStageBinding
from passbook.flows.planner import FlowPlan from passbook.flows.planner import FlowPlan