Archived
2
0
Fork 0
forked from blallo/Feedati

(bad) test for panelcli integration

This commit is contained in:
boyska 2018-09-29 23:57:36 +02:00
parent 3d257e7581
commit 5cab65d85f
4 changed files with 19 additions and 1 deletions

View file

@ -72,5 +72,12 @@ services:
image: jumanjiman/rsyslog:latest
container_name: feedati_syslog
panel:
image: feedati/feedspanel:latest
build:
context:
./panel/
container_name: feedati_panel
volumes:
postgres_data:

6
docker/dbconf-perms.sql Normal file
View file

@ -0,0 +1,6 @@
-- these commands must be given AFTER `panelcli setup` has been run
-- and ttrss has created its tables
-- having a 'ALTER DEFAULT PRIVILEGES IN SCHEMA public' might be a little cleaner than this
GRANT USAGE ON SCHEMA users TO apache;
GRANT SELECT ON TABLE users.users TO apache;
GRANT SELECT ON ALL TABLES IN SCHEMA public TO panel;

View file

@ -1,4 +1,6 @@
CREATE EXTENSION IF NOT EXISTS "uuid-ossp";
CREATE USER ttrss WITH PASSWORD 'ttpass';
CREATE USER panel WITH PASSWORD 'panelpass';
GRANT CREATE ON DATABASE feeds TO 'panel';
GRANT CREATE ON DATABASE feeds TO panel;
GRANT CREATE ON DATABASE feeds TO ttrss;
CREATE USER apache WITH PASSWORD 'apachepass';

View file

@ -81,6 +81,9 @@ def task_dbprepare():
'env PGPASSWORD=superpass psql -h 127.0.0.1 -f - -d feeds superadmin < docker/dbconf.sql',
r'docker exec -i $(docker ps -aqf name=feedati_db) '
'env PGPASSWORD=ttpass psql -h 127.0.0.1 -f - -d feeds ttrss < docker/ttrss.sql',
'docker run feedati/feedspanel -db-pass panelpass -db-addr db:5432 batch',
r'env PGPASSWORD=ttpass psql -h 127.0.0.1 -f - -d feeds ttrss <<< '
'"GRANT SELECT ON TABLE users.users TO \'apache\'"',
'echo DB RESTORED',
],
'teardown': [(stop, [])],