From baaf670701896c46ba9ffea3a3f1c202df1840d2 Mon Sep 17 00:00:00 2001 From: Richard Yen Date: Sat, 22 Feb 2020 01:10:39 -0800 Subject: [PATCH 2/2] run scripts to load varnish and from load_initial_data.sh --- docker-compose.yml | 2 ++ entrypoint.sh | 2 ++ requirements.txt | 1 + 3 files changed, 5 insertions(+) diff --git a/docker-compose.yml b/docker-compose.yml index 71a0d3c..37a39ab 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -7,6 +7,8 @@ services: POSTGRES_PASSWORD: "postgres" POSTGRES_USER: "postgres" POSTGRES_DB: "pgweb" + volumes: + - ./sql:/docker-entrypoint-initdb.d web: build: . entrypoint: /code/entrypoint.sh diff --git a/entrypoint.sh b/entrypoint.sh index db75ffa..8553e6e 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -2,4 +2,6 @@ python /code/manage.py makemigrations python /code/manage.py migrate +python /code/manage.py loaddata /code/pgweb/core/fixtures/data.yaml +python /code/manage.py loaddata /code/pgweb/contributors/fixtures/data.yaml python /code/manage.py runserver 0.0.0.0:8000 diff --git a/requirements.txt b/requirements.txt index bed81ea..3bb64e3 100644 --- a/requirements.txt +++ b/requirements.txt @@ -7,3 +7,4 @@ requests-oauthlib==0.4.0 cvss==1.9 pytidylib==0.3.2 pycodestyle==2.4.0 +PyYAML>=5.3 -- 2.20.1