NAME IMAGE COMMAND SERVICE CREATED STATUS PORTS
wai-sdg-portal-backend-1 python:3.8.5 "./dev.sh" backend 4 hours ago Up 4 hours
wai-sdg-portal-db-1 postgres:12-alpine "docker-entrypoint.s…" db 4 hours ago Up 4 hours 0.0.0.0:5432->5432/tcp, :::5432->5432/tcp
wai-sdg-portal-frontend-1 akvo/akvo-node-18-alpine:20220923.084347.0558ee6 "run-as-user.sh ./st…" frontend 4 hours ago Up 4 hours
wai-sdg-portal-mainnetwork-1 alpine:3.14.0 "tail -f /dev/null" mainnetwork 4 hours ago Up 4 hours 0.0.0.0:3000->3000/tcp, :::3000->3000/tcp, 0.0.0.0:5050->5050/tcp, :::5050->5050/tcp, 0.0.0.0:8000->8000/tcp, :::8000->8000/tcp
wai-sdg-portal-pgadmin-1 dpage/pgadmin4:5.7 "/entrypoint.sh" pgadmin 4 hours ago Up 4 hours
wai-sdg-portal-worker-1 python:3.8.5 "./worker.sh" worker 4 hours ago Up 4 hours
docker compose top backend | tail -n +2 | head -n -1
UID | PID | PPID | C | STIME | TTY | TIME | CMD | | | | | | | | |
root | 94628 | 94577 | 0 | 12:12 | ? | 00:00:00 | bash | ./dev.sh | | | | | | | |
root | 95594 | 94628 | 3 | 12:12 | ? | 00:08:17 | /usr/local/bin/python | /usr/local/bin/uvicorn | main:app | –reload | –port | 5000 | | | |
root | 95595 | 95594 | 0 | 12:12 | ? | 00:00:00 | /usr/local/bin/python | -c | from | multiprocessing.resource_tracker | import | main;main(4) | | | |
root | 95596 | 95594 | 0 | 12:12 | ? | 00:00:49 | /usr/local/bin/python | -c | from | multiprocessing.spawn | import | spawn_main; | spawn_main(tracker_fd=5, | pipe_handle=7) | –multiprocessing-fork |
docker compose exec backend ./seed.sh
This script require more than 0 argument/s
Example: ./test.sh [email protected] "My Name" "My Organisation"
docker compose exec backend cat ./seed.sh | grep seeder. | sed 's/#\ //g'
python -m seeder.administration
python -m seeder.admin "$@"
python -m seeder.fake_user 30 "$3"
python -m seeder.form
python -m seeder.datapoint "$1"
docker compose -f docker-compose.yml top frontend | tail -n +2 | head -n -1
UID | PID | PPID | C | STIME | TTY | TIME | CMD | | |
root | 94620 | 94559 | 0 | 12:12 | ? | 00:00:00 | bash | ./start.sh | |
root | 94820 | 94620 | 0 | 12:12 | ? | 00:00:03 | node | /opt/yarn-v1.22.19/bin/yarn.js | start |
root | 94841 | 94820 | 0 | 12:12 | ? | 00:00:00 | usr/local/bin/node | /app/node_modules.bin/react-scripts | start |
root | 94849 | 94841 | 0 | 12:12 | ? | 00:00:21 | /usr/local/bin/node | /app/node_modules/react-scripts/scripts/start.js | |
docker compose exec frontend yarn run
yarn run v1.22.19
info Commands available from binary scripts: acorn, ansi-html, autoprefixer, browserslist, browserslist-lint, cross-env, cross-env-shell, css-blank-pseudo, css-has-pseudo, css-prefers-color-scheme, cssesc, detect, detect-port, detective, ejs, escodegen, esgenerate, eslint, eslint-config-prettier, esparse, esvalidate, he, html-minifier-terser, import-local-fixture, is-docker, jake, jest, js-yaml, jsesc, json5, loose-envify, lz-string, mime, mkdirp, multicast-dns, nanoid, nmtree, node-which, parser, prettier, react-scripts, regjsparser, remarkable, resolve, rimraf, rollup, sass, semver, sha.js, svgo, synp, tailwind, tailwindcss, terser, topo2geo, topomerge, topoquantize, uuid, webpack, webpack-dev-server, yarn-audit-fix
info Project commands
- build
react-scripts build
- eject
react-scripts eject
- lint
eslint --config .eslintrc.json src --ext .js,.jsx
- prettier
prettier --check src
- start
react-scripts start
- test
react-scripts test --updateSnapshot --transformIgnorePatterns "node_modules/(?!d3|d3-geo|d3-array|internmap|delaunator|robust-predicates|react-leaflet)/"
- test:ci
CI=true react-scripts test --watchAll=false --coverage --transformIgnorePatterns "node_modules/(?!d3|d3-geo|d3-array|internmap|delaunator|robust-predicates)/"
Done in 0.02s.
docker compose top worker | tail -n +2 | head -n -1
UID | PID | PPID | C | STIME | TTY | TIME | CMD | | | | | | | | |
root | 94704 | 94679 | 0 | 12:12 | ? | 00:00:00 | bash | ./worker.sh | | | | | | | |
root | 95588 | 94704 | 3 | 12:12 | ? | 00:08:19 | /usr/local/bin/python | /usr/local/bin/uvicorn | worker:worker | –reload | –port | 5001 | | | |
root | 95590 | 95588 | 0 | 12:12 | ? | 00:00:00 | /usr/local/bin/python | -c | from | multiprocessing.resource_tracker | import | main;main(4) | | | |
root | 95591 | 95588 | 0 | 12:12 | ? | 00:00:55 | /usr/local/bin/python | -c | from | multiprocessing.spawn | import | spawn_main; | spawn_main(tracker_fd=5, | pipe_handle=7) | –multiprocessing-fork |
docker compose top db | tail -n +2 | head -n -1
UID | PID | PPID | C | STIME | TTY | TIME | CMD | | | | |
70 | 94342 | 94316 | 0 | 12:12 | ? | 00:00:00 | postgres | | | | |
70 | 94635 | 94342 | 0 | 12:12 | ? | 00:00:00 | postgres: | checkpointer | | | |
70 | 94636 | 94342 | 0 | 12:12 | ? | 00:00:00 | postgres: | background | writer | | |
70 | 94637 | 94342 | 0 | 12:12 | ? | 00:00:00 | postgres: | walwriter | | | |
70 | 94638 | 94342 | 0 | 12:12 | ? | 00:00:00 | postgres: | autovacuum | launcher | | |
70 | 94639 | 94342 | 0 | 12:12 | ? | 00:00:00 | postgres: | stats | collector | | |
70 | 94640 | 94342 | 0 | 12:12 | ? | 00:00:00 | postgres: | logical | replication | launcher | |
70 | 95628 | 94342 | 0 | 12:12 | ? | 00:00:00 | postgres: | wai | wai_demo | 172.20.0.3(38228) | idle |
70 | 95629 | 94342 | 0 | 12:12 | ? | 00:00:02 | postgres: | wai | wai_demo | 172.20.0.3(38234) | idle |
70 | 95642 | 94342 | 0 | 12:12 | ? | 00:00:00 | postgres: | wai | wai_demo | 172.20.0.3(38242) | idle |
70 | 103242 | 94342 | 0 | 12:17 | ? | 00:00:00 | postgres: | wai | wai_demo | 172.20.0.3(36900) | idle |
70 | 103243 | 94342 | 0 | 12:17 | ? | 00:00:00 | postgres: | wai | wai_demo | 172.20.0.3(36916) | idle |
70 | 103244 | 94342 | 0 | 12:17 | ? | 00:00:00 | postgres: | wai | wai_demo | 172.20.0.3(36926) | idle |
docker compose top pgadmin | tail -n +2 | head -n -1
UID | PID | PPID | C | STIME | TTY | TIME | CMD | | | | | | | | | | | | | | |
5050 | 94608 | 94537 | 0 | 12:12 | ? | 00:00:03 | /venv/bin/python3 | /venv/bin/gunicorn | –timeout | 86400 | –bind | [::]:5050 | -w | 1 | –threads | 25 | –access-logfile | - | -c | gunicorn_config.py | run_pgadmin:app |
root | 94812 | 94608 | 0 | 12:12 | ? | 00:00:00 | /usr/libexec/postfix/master | -w | | | | | | | | | | | | | |
systemd+ | 94814 | 94812 | 0 | 12:12 | ? | 00:00:00 | qmgr | -l | -t | unix | -u | | | | | | | | | | |
5050 | 94905 | 94608 | 0 | 12:12 | ? | 00:00:09 | /venv/bin/python3 | /venv/bin/gunicorn | –timeout | 86400 | –bind | [::]:5050 | -w | 1 | –threads | 25 | –access-logfile | - | -c | gunicorn_config.py | run_pgadmin:app |
systemd+ | 425845 | 94812 | 0 | 15:32 | ? | 00:00:00 | pickup | -l | -t | unix | -u | | | | | | | | | | |
docker compose top mainnetwork | tail -n +2 | head -n -1
UID | PID | PPID | C | STIME | TTY | TIME | CMD | | |
root | 94393 | 94363 | 0 | 12:12 | ? | 00:00:00 | tail | -f | /dev/null |
SELECT relname, relkind
FROM pg_class
WHERE relreplident = 'd'
AND relhasindex = true;
relname | relkind |
alembic_version | r |
administration | r |
access | r |
question_group | r |
form | r |
question | r |
data | r |
answer | r |
organisation | r |
jobs | r |
log | r |
option | r |
history | r |
user | r |
List of relations | | | |
Schema | Name | Type | Owner |
public | access | table | wai |
public | access_id_seq | sequence | wai |
public | administration | table | wai |
public | administration_id_seq | sequence | wai |
public | alembic_version | table | wai |
public | answer | table | wai |
public | answer_id_seq | sequence | wai |
public | answer_search | view | wai |
public | data | table | wai |
public | data_id_seq | sequence | wai |
public | form | table | wai |
public | form_id_seq | sequence | wai |
public | history | table | wai |
public | history_id_seq | sequence | wai |
public | jobs | table | wai |
public | jobs_id_seq | sequence | wai |
public | log | table | wai |
public | log_id_seq | sequence | wai |
public | option | table | wai |
public | option_id_seq | sequence | wai |
public | organisation | table | wai |
public | organisation_id_seq | sequence | wai |
public | question | table | wai |
public | question_group | table | wai |
public | question_group_id_seq | sequence | wai |
public | question_id_seq | sequence | wai |
public | score_view | view | wai |
public | user | table | wai |
public | user_id_seq | sequence | wai |
SELECT ordinal_position as pos, column_name, data_type, column_default, is_nullable
FROM information_schema.columns
WHERE table_name = 'administration'
ORDER BY ordinal_position;
pos | column_name | data_type | udt_name | column_default | is_nullable |
1 | id | integer | int4 | nextval(‘administration_id_seq’::regclass) | NO |
2 | parent | integer | int4 | | YES |
3 | name | character varying | varchar | | YES |
SELECT ordinal_position as pos, column_name, data_type, column_default, is_nullable
FROM information_schema.columns
WHERE table_name = 'user'
ORDER BY ordinal_position;
#+RESULTS[4b85690f95d5625880d544e9c31fa14f9e298a2d]: User Table
pos | column_name | data_type | column_default | is_nullable |
1 | id | integer | nextval(‘user_id_seq’::regclass) | NO |
2 | email | character varying | | YES |
3 | active | boolean | | YES |
4 | role | USER-DEFINED | | YES |
5 | created | timestamp without time zone | | YES |
6 | organisation | integer | | YES |
7 | name | character varying | | YES |
8 | __ts_vector__ | tsvector | | YES |
9 | manage_form_passcode | boolean | false | NO |
SELECT ordinal_position as pos, column_name, data_type, column_default, is_nullable
FROM information_schema.columns
WHERE table_name = 'access'
ORDER BY ordinal_position;
#+RESULTS[adbead29284e379ca968ed55ad3421690c6b1db7]: Access Table
pos | column_name | data_type | column_default | is_nullable |
1 | id | integer | nextval(‘access_id_seq’::regclass) | NO |
2 | user | integer | | YES |
3 | administration | integer | | YES |
SELECT ordinal_position as pos, column_name, data_type, column_default, is_nullable
FROM information_schema.columns
WHERE table_name = 'organisation'
ORDER BY ordinal_position;
#+RESULTS[7bf076cc41617ce9589ff081d087599a2e633d13]: Organisation Table
pos | column_name | data_type | column_default | is_nullable |
1 | id | integer | nextval(‘organisation_id_seq’::regclass) | NO |
2 | name | character varying | | YES |
3 | type | USER-DEFINED | | YES |
4 | created | timestamp without time zone | | YES |
SELECT ordinal_position as pos, column_name, data_type, column_default, is_nullable
FROM information_schema.columns
WHERE table_name = 'form'
ORDER BY ordinal_position;
#+RESULTS[c54a7a04e0e7c6e7bf1a49fdb94c7172fa7246fc]: Forms
pos | column_name | data_type | column_default | is_nullable |
1 | id | integer | nextval(‘form_id_seq’::regclass) | NO |
2 | name | character varying | | YES |
3 | description | text | | YES |
4 | default_language | character varying | | YES |
5 | languages | ARRAY | | YES |
6 | translations | ARRAY | | YES |
7 | version | double precision | | YES |
SELECT ordinal_position as pos, column_name, data_type, column_default, is_nullable
FROM information_schema.columns
WHERE table_name = 'question_group'
ORDER BY ordinal_position;
#+RESULTS[1fe1ac7968bd4854ec03a82fe25d55d141850691]: Question Group
pos | column_name | data_type | column_default | is_nullable |
1 | id | integer | nextval(‘question_group_id_seq’::regclass) | NO |
2 | order | integer | | YES |
3 | name | character varying | | YES |
4 | form | integer | | YES |
5 | description | text | | YES |
6 | repeatable | boolean | false | YES |
7 | repeat_text | character varying | | YES |
8 | translations | ARRAY | | YES |
SELECT ordinal_position as pos, column_name, data_type, column_default, is_nullable
FROM information_schema.columns
WHERE table_name = 'question'
ORDER BY ordinal_position;
#+RESULTS[2399099ab9d57c0d84c791448f4eccf3835013bf]: Question
pos | column_name | data_type | column_default | is_nullable |
1 | id | integer | nextval(‘question_id_seq’::regclass) | NO |
2 | order | integer | | YES |
3 | name | character varying | | YES |
4 | form | integer | | YES |
5 | meta | boolean | | NO |
6 | type | USER-DEFINED | | YES |
7 | question_group | integer | | YES |
8 | required | boolean | true | NO |
9 | rule | jsonb | | YES |
10 | dependency | ARRAY | | YES |
11 | tooltip | jsonb | | YES |
12 | translations | ARRAY | | YES |
13 | api | jsonb | | YES |
14 | addons | jsonb | | YES |
SELECT ordinal_position as pos, column_name, data_type, column_default, is_nullable
FROM information_schema.columns
WHERE table_name = 'option'
ORDER BY ordinal_position;
#+RESULTS[7c5d1e387658b945b174d36b0b2bc525e4df38b9]: Option
pos | column_name | data_type | column_default | is_nullable |
1 | id | integer | nextval(‘option_id_seq’::regclass) | NO |
2 | order | integer | | YES |
3 | name | character varying | | YES |
4 | question | integer | | YES |
5 | color | character varying | | YES |
6 | score | integer | | YES |
7 | code | character varying | | YES |
8 | translations | ARRAY | | YES |
SELECT ordinal_position as pos, column_name, data_type, column_default, is_nullable
FROM information_schema.columns
WHERE table_name = 'data'
ORDER BY ordinal_position;
#+RESULTS[2a3966dbeff760e3b1765f1912656e4e9b493ec3]: Data
pos | column_name | data_type | column_default | is_nullable |
1 | id | integer | nextval(‘data_id_seq’::regclass) | NO |
2 | name | character varying | | YES |
3 | form | integer | | YES |
4 | administration | integer | | YES |
5 | geo | ARRAY | | YES |
6 | created_by | integer | | YES |
7 | updated_by | integer | | YES |
8 | created | timestamp without time zone | CURRENT_TIMESTAMP | YES |
9 | updated | timestamp without time zone | | YES |
SELECT ordinal_position as pos, column_name, data_type, column_default, is_nullable
FROM information_schema.columns
WHERE table_name = 'answer'
ORDER BY ordinal_position;
#+RESULTS[694ea6cbed80bd18b74ff098f928b802756b1613]: Answer
pos | column_name | data_type | column_default | is_nullable |
1 | id | integer | nextval(‘answer_id_seq’::regclass) | NO |
2 | question | integer | | YES |
3 | data | integer | | YES |
4 | value | double precision | | YES |
5 | text | text | | YES |
6 | options | ARRAY | | YES |
7 | created_by | integer | | YES |
8 | updated_by | integer | | YES |
9 | created | timestamp without time zone | CURRENT_TIMESTAMP | YES |
10 | updated | timestamp without time zone | | YES |
SELECT ordinal_position as pos, column_name, data_type, column_default, is_nullable
FROM information_schema.columns
WHERE table_name = 'history'
ORDER BY ordinal_position;
#+RESULTS[a95c8468e9da820f7161b11e8eb9d7ae064f08bd]: History
pos | column_name | data_type | column_default | is_nullable |
1 | id | integer | nextval(‘history_id_seq’::regclass) | NO |
2 | question | integer | | YES |
3 | data | integer | | YES |
4 | value | double precision | | YES |
5 | text | text | | YES |
6 | options | ARRAY | | YES |
7 | created_by | integer | | YES |
8 | updated_by | integer | | YES |
9 | created | timestamp without time zone | CURRENT_TIMESTAMP | YES |
10 | updated | timestamp without time zone | | YES |
SELECT ordinal_position as pos, column_name, data_type, column_default, is_nullable
FROM information_schema.columns
WHERE table_name = 'jobs'
ORDER BY ordinal_position;
#+RESULTS[2a246912a94877079579e5884fcaafb255510972]: Jobs
pos | column_name | data_type | column_default | is_nullable |
1 | id | integer | nextval(‘jobs_id_seq’::regclass) | NO |
2 | type | USER-DEFINED | | YES |
3 | status | USER-DEFINED | ‘pending’::jobstatus | YES |
4 | payload | text | | NO |
5 | info | jsonb | | YES |
6 | attempt | integer | 0 | YES |
7 | created_by | integer | | NO |
8 | created | timestamp without time zone | CURRENT_TIMESTAMP | YES |
9 | available | timestamp without time zone | | YES |
SELECT ordinal_position as pos, column_name, data_type, column_default, is_nullable
FROM information_schema.columns
WHERE table_name = 'log'
ORDER BY ordinal_position;
#+RESULTS[28675ec2c91ade8752e958cc705195948562d3d8]: Log
pos | column_name | data_type | column_default | is_nullable |
1 | id | integer | nextval(‘log_id_seq’::regclass) | NO |
2 | user | integer | | YES |
3 | message | text | | YES |
4 | at | timestamp without time zone | CURRENT_TIMESTAMP | YES |
5 | jobs | integer | | YES |