Commit f8e35d9b authored by John Noel's avatar John Noel

Updated README

parent 6fd1bb81
# Getting Started with Rails, Docker
## Usage
* Clone this repository
```bash
# via SSH
git clone ssh://git@gitlab.discs.ateneo.edu:15316/mis-21-2018-intersession/1-getting-started-with-rails.git sample_app
# via HTTP
git clone https://gitlab.discs.ateneo.edu/mis-21-2018-intersession/1-getting-started-with-rails.git sample_app
```
**Note**: You can replace the name of the project e.g. ``sample_app`` to any preferred project name.
* Go inside the cloned repository
```bash
cd sample_app
```
* Make sure that the ``start`` file is executable.
```bash
chmod +x start
```
* Build and start Docker containers
```bash
docker-compose build
docker-compose up
```
* Open another Terminal (Mac/Unix) / Powershell (Windows)
* Stop Docker containers
```bash
docker-compose down
```
* Create a new Rails project
```bash
docker-compose run web rails new . --force --database=postgresql
```
**Notes**: You can remove ``--database=postgresql`` if a different database engine will be used.
* Start again Docker containers
```bash
docker-compose up
```
* Create the ``development`` and ``test`` database
```bash
docker-compose run web rails db:create
```
\ 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