From 0de199035d751b63327146ac1db923511f54529d Mon Sep 17 00:00:00 2001 From: bnewbold Date: Wed, 4 May 2016 16:52:48 -0400 Subject: mediagoblin: small fixes; db location; permissions; data path --- roles/mediagoblin/tasks/mediagoblin.yml | 6 +++--- .../mediagoblin/templates/etc_nginx_sites-available_mediagoblin.j2 | 2 +- roles/mediagoblin/templates/mediagoblin_local.ini.j2 | 3 ++- 3 files changed, 6 insertions(+), 5 deletions(-) (limited to 'roles') diff --git a/roles/mediagoblin/tasks/mediagoblin.yml b/roles/mediagoblin/tasks/mediagoblin.yml index c99b65c..ff092e6 100644 --- a/roles/mediagoblin/tasks/mediagoblin.yml +++ b/roles/mediagoblin/tasks/mediagoblin.yml @@ -30,7 +30,7 @@ - name: Create user data directory file: name={{ mediagoblin_basedir }}/data state=directory - mode=0750 + mode=0755 owner={{ mediagoblin_user }} - name: Create mediagoblin PID directory @@ -102,8 +102,8 @@ - name: Have systemd detect new files shell: systemctl daemon-reload -- name: Start systemd paster service - shell: systemctl start mediagoblin-celeryd.service && systemctl start mediagoblin-paster.service +- name: (Re)start systemd paster service + shell: systemctl restart mediagoblin-celeryd.service && systemctl restart mediagoblin-paster.service - name: Enable systemd services shell: systemctl enable mediagoblin-celeryd.service && systemctl enable mediagoblin-paster.service diff --git a/roles/mediagoblin/templates/etc_nginx_sites-available_mediagoblin.j2 b/roles/mediagoblin/templates/etc_nginx_sites-available_mediagoblin.j2 index 855c580..dad976c 100644 --- a/roles/mediagoblin/templates/etc_nginx_sites-available_mediagoblin.j2 +++ b/roles/mediagoblin/templates/etc_nginx_sites-available_mediagoblin.j2 @@ -23,7 +23,7 @@ server { # Instance specific media: location /mgoblin_media/ { - alias {{ mediagoblin_basedir }}/src/user_dev/media/public/; + alias {{ mediagoblin_basedir }}/data/media/public/; } # Theme static files (usually symlinked in) diff --git a/roles/mediagoblin/templates/mediagoblin_local.ini.j2 b/roles/mediagoblin/templates/mediagoblin_local.ini.j2 index 535cb0a..bca94f8 100644 --- a/roles/mediagoblin/templates/mediagoblin_local.ini.j2 +++ b/roles/mediagoblin/templates/mediagoblin_local.ini.j2 @@ -8,7 +8,7 @@ # directory in paste.ini and/or your webserver configuration. # # [DEFAULT] -# data_basedir = "/var/lib/mediagoblin" +data_basedir = "{{ mediagoblin_basedir }}/data" [mediagoblin] direct_remote_path = /mgoblin_static/ @@ -18,6 +18,7 @@ email_sender_address = "{{ mediagoblin_email_sender }}" ## Default is a local sqlite db "mediagoblin.db". ## Don't forget to run `./bin/gmg dbupdate` after having changed it. # sql_engine = postgresql:///mediagoblin +sql_engine = "sqlite:///{{ mediagoblin_basedir }}/data/mediagoblin.db" # Set to false to enable sending notices email_debug_mode = true -- cgit v1.2.3