File tree Expand file tree Collapse file tree 3 files changed +52
-0
lines changed Expand file tree Collapse file tree 3 files changed +52
-0
lines changed Original file line number Diff line number Diff line change 15
15
16
16
# ignore docker file
17
17
.env
18
+ .env.prod
18
19
19
20
# Ignore uploaded files in development
20
21
/storage /*
Original file line number Diff line number Diff line change
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
+ ```
Original file line number Diff line number Diff line change @@ -4,6 +4,10 @@ if [[ -a /tmp/puma.pid ]]; then
4
4
rm /tmp/puma.pid
5
5
fi
6
6
7
+ if [[ -a /tmp/pids/server.pid ]]; then
8
+ rm /tmp/pids/server.pid
9
+ fi
10
+
7
11
if [[ $RAILS_ENV == " production" ]]; then
8
12
rake assets:precompile
9
13
mkdir -p /usr/share/nginx/html
You can’t perform that action at this time.
0 commit comments