First, clone the repository:
$ git clone https://github.com/dfmoreto/hack2save-team8.git
then cd
into hack2save-team8
$ cd hack2save-team8
Set the sample configs for rails:
$ cp .env.sample .env
$ cp config/database-sample.yml config/database.yml
Pull and build docker
containers for project:
$ docker-compose build
$ docker-compose run web rails db:create db:migrate db:seed
Ask for permission on facebook dev app. After granting access, open the .env
file inside your favorite editor and set Facebook_APP_ID and Facebook_Secret_ID.
Then start the container:
$ docker-compose up
Then navigate with your browser to localhost:3000
, login with
username: [email protected]
password: '123456'
and have some fun!
To enter the container environment:
$ docker-compose run web bash
Remember that all the files created inside the container will belong to root.
Some files generated by Rails inside container may require changing permission access to edit. This can be bypassed with:
// Please use the command below with CAUTION, since it will change the ownership
of everything inside your current folder RECURSIVELY.
$ sudo chown -R <your_username> .