Skip to content

Commit 43b648c

Browse files
authored
What does this PR add? (#31)
* README update * Desployment md added, script start correction to dev and prod envs
1 parent f109fbf commit 43b648c

File tree

3 files changed

+52
-0
lines changed

3 files changed

+52
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515

1616
#ignore docker file
1717
.env
18+
.env.prod
1819

1920
# Ignore uploaded files in development
2021
/storage/*

DEPLOYMENT.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# Dr-movil
2+
3+
[![Maintainability](https://api.codeclimate.com/v1/badges/6413fb2d9ed1a3d8257e/maintainability)](https://codeclimate.com/github/ProyectoIntegrador2018/dr_movil/maintainability)
4+
5+
This proyect's objective is to help people better keep track of the different diseases
6+
they may have. We mainly take into account any kind of hearth disease and diabetes.
7+
8+
### Pre-requisites
9+
10+
1. You need to install Docker Desktop, to do that go to: https://www.docker.com/products/docker-desktop, create an account
11+
and download the software, once it's downloaded install Docker Desktop with the default configuration.
12+
Note: to download Docker Desktop you need to create an account with Docker.
13+
14+
2. Clone this repository into your local machine
15+
```bash
16+
$ git clone [email protected]:ProyectoIntegrador2018/dr_movil.git
17+
```
18+
3. AWS access and secret key.
19+
20+
### Deployment
21+
2. Fire up a terminal, navigate to the cloned git repo and run:
22+
```bash
23+
$ docker-machine create --driver amazonec2 --amazonec2-access-key AKI******* --amazonec2-secret-key 8T93C******* aws-sandbox
24+
```
25+
26+
3. (Optional) To make sure you created the instance correctly and it's active, run:
27+
```bash
28+
$ docker-machine ls -t "30"
29+
```
30+
Should look something like this:
31+
```bash
32+
NAME ACTIVE DRIVER STATE URL SWARM DOCKER ERRORS
33+
aws-sandbox * amazonec2 Running tcp://52.90.113.128:2376 v1.10.0
34+
```
35+
36+
4. Once the ec2 instance has been created on AWS run:
37+
```bash
38+
$ docker-compose -f docker-compose.prod.yml up -d --build
39+
```
40+
Then:
41+
```
42+
% rails db:create
43+
```
44+
Followed by:
45+
```
46+
% rails db:migrate
47+
```

script/start

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ if [[ -a /tmp/puma.pid ]]; then
44
rm /tmp/puma.pid
55
fi
66

7+
if [[ -a /tmp/pids/server.pid ]]; then
8+
rm /tmp/pids/server.pid
9+
fi
10+
711
if [[ $RAILS_ENV == "production" ]]; then
812
rake assets:precompile
913
mkdir -p /usr/share/nginx/html

0 commit comments

Comments
 (0)