noosfero | Fix Prod Docker (!1673)

Arthur Diniz gitlab at mg.gitlab.com
Mon Feb 11 16:37:32 BRST 2019


New Merge Request !1673

https://gitlab.com/noosfero/noosfero/merge_requests/1673

Project:Branches: lappis-unb/projects/fga/portal/noosfero:prod-docker to noosfero/noosfero:master
Author:    Arthur Diniz
Assignee:  


- Update Dockerfile image builder, now instead to build from a `Debian` image it build from a `Ruby` image, this makes the build image a lot smaller. On my build 	`547.70 MiB`


```bash
#path: config > docker > prod > Dockerfile
FROM ruby:2.1.5
```

- Remove `apache` and `varnish` from docker-compose and adds `nginx`, nginx uses one config file to set the environment located at `config/docker/prod/production.env`

```yml
  #prod.yml
  nginx:
    container_name: nginx
    image: nginx:1.14
    depends_on:      
      - noosfero    
    ports:      
      - 80:80
    networks:
      - noosfero-net  
    env_file:
      - config/docker/prod/production.env
    volumes:
      - noosfero-public:/noosfero/public
      - noosfero-log:/noosfero/log
      - ./config/docker/prod/nginx-start.sh:/tmp/nginx-start.sh
      - ./config/docker/prod/templates/nginx.template:/tmp/nginx.template
    command: /tmp/nginx-start.sh
```

- Update data task to identify THEME variable when setting database, this way now its possible to enable a custom theme when running docker-compose
```bash
#path: config/docker/prod/production.env

`ENVIRONMENT_THEME=default`
```

```bash
#path:  lib/tasks/data.rake

`sh 'rails', 'runner', "Environment.create!(:name => '#{name}', :theme => '#{theme}', :contact_email => '#{email}', :is_default => true) unless Environment.default"`
```

-- 
Reply to this email directly or view it on GitLab: https://gitlab.com/noosfero/noosfero/merge_requests/1673
You're receiving this email because of your account on gitlab.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listas.softwarelivre.org/pipermail/noosfero-dev/attachments/20190211/0bd98dff/attachment.html>


More information about the Noosfero-dev mailing list