noosfero | Duplicated actions running on development docker (#388)

Arthur Diniz gitlab at mg.gitlab.com
Tue Mar 12 09:46:33 BRT 2019



New Issue was created.

Issue 388: https://gitlab.com/noosfero/noosfero/issues/388
Author:    Arthur Diniz
Assignee:  

Running dev docker it is possible to notice that some scripts are running repeated commands. 

## Example 1

### Dev Dockerfile
```yml
8 RUN apt-get update && apt-get install -y sudo cron nodejs postgresql-client


18 RUN ./script/quick-start -i

```

### quick-start
```sh
      if which apt-get >/dev/null 2>&1; then
        sudo apt-get update
        sudo apt-get -y install lsb-release
```

## Example 2

### quick-start
```
if bundle exec rake db:exists; then
  echo "RUNNING MIGRATIONS"
  bundle exec rake db:migrate
else
  echo "SETTING THE DATABASE UP"
  bundle exec rake db:create
  bundle exec rake db:schema:load
  /noosfero/script/sample-data
fi
```

### entrypoint.sh
```
# Create table and sample data
    run rake db:schema:load
    run rake db:schema:load RAILS_ENV=test
```

## Adjustments

- [ ] `create a new quick-start` file with no duplicate commands just to run the docker environment
- [ ] `simplify entrypoint`
- [ ] `use script script/development` to start rails.

-- 
Reply to this email directly or view it on GitLab: https://gitlab.com/noosfero/noosfero/issues/388
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/20190312/6de61383/attachment.html>


More information about the Noosfero-dev mailing list