(bad) test for panelcli integration
This commit is contained in:
parent
3d257e7581
commit
5cab65d85f
4 changed files with 19 additions and 1 deletions
|
@ -72,5 +72,12 @@ services:
|
||||||
image: jumanjiman/rsyslog:latest
|
image: jumanjiman/rsyslog:latest
|
||||||
container_name: feedati_syslog
|
container_name: feedati_syslog
|
||||||
|
|
||||||
|
panel:
|
||||||
|
image: feedati/feedspanel:latest
|
||||||
|
build:
|
||||||
|
context:
|
||||||
|
./panel/
|
||||||
|
container_name: feedati_panel
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
postgres_data:
|
postgres_data:
|
||||||
|
|
6
docker/dbconf-perms.sql
Normal file
6
docker/dbconf-perms.sql
Normal 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;
|
|
@ -1,4 +1,6 @@
|
||||||
CREATE EXTENSION IF NOT EXISTS "uuid-ossp";
|
CREATE EXTENSION IF NOT EXISTS "uuid-ossp";
|
||||||
CREATE USER ttrss WITH PASSWORD 'ttpass';
|
CREATE USER ttrss WITH PASSWORD 'ttpass';
|
||||||
CREATE USER panel WITH PASSWORD 'panelpass';
|
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';
|
||||||
|
|
3
dodo.py
3
dodo.py
|
@ -81,6 +81,9 @@ def task_dbprepare():
|
||||||
'env PGPASSWORD=superpass psql -h 127.0.0.1 -f - -d feeds superadmin < docker/dbconf.sql',
|
'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) '
|
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',
|
'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',
|
'echo DB RESTORED',
|
||||||
],
|
],
|
||||||
'teardown': [(stop, [])],
|
'teardown': [(stop, [])],
|
||||||
|
|
Loading…
Reference in a new issue