]> git.parisson.com Git - timeside.git/commitdiff
try to fix psql commands in docker
authorGuillaume Pellerin <yomguy@parisson.com>
Mon, 10 Nov 2014 10:08:03 +0000 (11:08 +0100)
committerGuillaume Pellerin <yomguy@parisson.com>
Mon, 10 Nov 2014 10:08:03 +0000 (11:08 +0100)
Dockerfile
examples/sandbox/settings.py

index 22f7c31588af1650067568a44e2e156533d58892..517b300a9ebd31249c97f7f3a249e9a3aea25d67 100644 (file)
@@ -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
index 3aba7f16619a415bfd41559564441022ce44c379..6720c1611f49ade0cd4541fbff8dac165a5405ba 100644 (file)
@@ -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.