Commit 399ade17 authored by Arthur Diniz's avatar Arthur Diniz

Fix docker bugs

Signed-off-by: Arthur Diniz's avatarArthur Diniz <arthurbdiniz@gmail.com>

- Remove database copy from dev Dockerfile
- Remove .irbrc config from  production Dockerfile
- Makes PID VERIFICATION to remove all files on pid folder
- Change backup volume on production docker-compose to tmp/backup
- Fix nginx redirect to rails_app
parent dcb2585f
Pipeline #57826074 passed with stages
in 23 minutes and 35 seconds
......@@ -10,8 +10,6 @@ RUN apt-get update && apt-get install -y sudo cron nodejs postgresql-client
WORKDIR /noosfero
ADD . /noosfero/
COPY config/database.yml.docker config/database.yml
RUN echo "IRB.conf[:SAVE_HISTORY] = 100" >> .irbrc
RUN echo "IRB.conf[:HISTORY_FILE] = '~/.irb-history'" >> .irbrc
......
FROM ruby:2.6.1-stretch
FROM ruby:2.3-stretch
LABEL Maintainer="Noosfero Development Team <noosfero-dev@listas.softwarelivre.org>"
LABEL Description="This dockerfile builds a noosfero production environment."
......@@ -12,9 +12,6 @@ ADD . /noosfero/
COPY config/database.yml.docker config/database.yml
RUN echo "IRB.conf[:SAVE_HISTORY] = 100" >> .irbrc
RUN echo "IRB.conf[:HISTORY_FILE] = '~/.irb-history'" >> .irbrc
RUN bundle install --jobs 20 --retry 5 --without development test
ENTRYPOINT ["config/docker/prod/noosfero-entrypoint.sh"]
......
......@@ -44,7 +44,7 @@ else
fi
echo ">>>>> PID VERIFICATION <<<<<"
pidfile='/noosfero/tmp/pids/server.pid'
pidfile='/noosfero/tmp/pids/*.*'
if [ -f $pidfile ] ; then
echo 'Server PID file exists. Removing it...'
rm $pidfile
......
......@@ -41,7 +41,7 @@ server {
location @rails {
#proxy_set_header X-Real-IP $remote_addr;
#proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
#proxy_set_header Host $http_host;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_pass http://rails_app;
}
......
......@@ -26,7 +26,7 @@ services:
env_file:
- config/docker/prod/production.env
volumes:
- ./tmp/backup:/dump
- ./tmp/backup:/tmp/backup
- noosfero-public:/noosfero/public
- noosfero-log:/noosfero/log
......
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