Commit 11f0b6c4 authored by Michał 'rysiek' Woźniak's avatar Michał 'rysiek' Woźniak
Browse files

asset precompilation has to happen after db is setup, because reasons I guess. eh.

parent b0d698fe
...@@ -17,9 +17,6 @@ RUN git clone https://0xacab.org/schleuder/schleuder-web.git /opt/schleuder-web ...@@ -17,9 +17,6 @@ RUN git clone https://0xacab.org/schleuder/schleuder-web.git /opt/schleuder-web
# remove the default config files # remove the default config files
RUN rm /opt/schleuder-web/config/schleuder-web.yml /opt/schleuder-web/config/secrets.yml /opt/schleuder-web/config/database.yml RUN rm /opt/schleuder-web/config/schleuder-web.yml /opt/schleuder-web/config/secrets.yml /opt/schleuder-web/config/database.yml
# precompile assets
RUN cd /opt/schleuder-web && RAILS_ENV=production bundle exec rake assets:precompile
COPY entrypoint.sh /sbin/entrypoint.sh COPY entrypoint.sh /sbin/entrypoint.sh
RUN chmod a+x /sbin/entrypoint.sh RUN chmod a+x /sbin/entrypoint.sh
......
...@@ -245,6 +245,9 @@ else ...@@ -245,6 +245,9 @@ else
su -p -c "env PATH=\"$PATH\" bundle exec rake db:setup RAILS_ENV=production" "$WEBSCHLOCKER_USER" su -p -c "env PATH=\"$PATH\" bundle exec rake db:setup RAILS_ENV=production" "$WEBSCHLOCKER_USER"
fi fi
# precompile assets
su -p -c "env PATH=\"$PATH\" bundle exec rake assets:precompile RAILS_ENV=production" "$WEBSCHLOCKER_USER"
# make sure the envvars are available within su # make sure the envvars are available within su
export WEBSCHLOCKER_BIND_ADDRESS WEBSCHLOCKER_BIND_PORT export WEBSCHLOCKER_BIND_ADDRESS WEBSCHLOCKER_BIND_PORT
...@@ -260,4 +263,4 @@ fi ...@@ -260,4 +263,4 @@ fi
echo echo
echo "+-- executing:" echo "+-- executing:"
echo " $*" echo " $*"
exec su -p -c "env PATH=\"$PATH\" $*" "$WEBSCHLOCKER_USER" exec su -p -c "env PATH=\"$PATH\" $*" "$WEBSCHLOCKER_USER"
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment