From: Guillaume Pellerin Date: Mon, 10 Nov 2014 10:08:03 +0000 (+0100) Subject: try to fix psql commands in docker X-Git-Tag: 0.7^2~38^2~29 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=dd6015a8df50d2ff79f0933d549ba122bbef574d;p=timeside.git try to fix psql commands in docker --- diff --git a/Dockerfile b/Dockerfile index 22f7c31..517b300 100644 --- a/Dockerfile +++ b/Dockerfile @@ -37,8 +37,10 @@ add . /opt/TimeSide volume ["/etc/postgresql", "/var/log/postgresql", "/var/lib/postgresql"] user postgres run /etc/init.d/postgresql start &&\ - psql --command "CREATE USER docker WITH SUPERUSER PASSWORD 'docker';" &&\ - createdb -O docker docker + psql --command "CREATE USER docker WITH SUPERUSER; &&\ + psql --command "ALTER USER WITH PASSWORD 'docker';" &&\ + psql --command "CREATE DATABASE timeside;" &&\ + psql --command "ALTER DATABASE timeside OWNER TO docker;" user root # setup all the configfiles diff --git a/examples/sandbox/settings.py b/examples/sandbox/settings.py index 3aba7f1..6720c16 100644 --- a/examples/sandbox/settings.py +++ b/examples/sandbox/settings.py @@ -18,7 +18,7 @@ PROJECT_ROOT = os.path.dirname(os.path.abspath(__file__)) DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql_psycopg2', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'. - 'NAME': 'docker', # Or path to database file if using sqlite3. + 'NAME': 'timeside', # Or path to database file if using sqlite3. 'USER': 'docker', # Not used with sqlite3. 'PASSWORD': 'docker', # Not used with sqlite3. 'HOST': '', # Set to empty string for localhost. Not used with sqlite3.