|
1 | 1 | # Silma |
2 | | -This guide includes the detail to perform a productive deployment of project Silma |
| 2 | +This guide includes the detail to perform a productive deployment of project Silma. |
3 | 3 |
|
4 | | -<em>Note: At the moment there's not a productive environment. The instalation of the productive enviornment will be performed on the next sprint, therefore this guide will detail the process of installing a development enviornment.</em> |
| 4 | +### Production for Heroku |
5 | 5 |
|
6 | | -### Devolpment |
| 6 | +1. Make sure to be in `production` branch: |
| 7 | +```sh |
| 8 | +git checkout production |
| 9 | +``` |
7 | 10 |
|
8 | | -1. Install Node JS v12.15 (Version used to develop the project) |
9 | | -2. Install the program MongoDB Community Edition "https://www.mongodb.com/download-center/community" |
10 | | -3. Clone the repository located at "https://github.com/ProyectoIntegrador2018/silma.git" |
| 11 | +2. Pull changes from master: |
| 12 | +```sh |
| 13 | +git pull origin master |
| 14 | +``` |
11 | 15 |
|
12 | | -### Front-end: |
13 | | -1. Open up a terminal and go where you cloned the project, execute `cd front` |
14 | | -2. Run `npm install` to download the Fornt-end dependencies |
15 | | -3. Run `npm run serve` to intialize the front-end server |
16 | | -4. The server will be initialized at port 8080 |
17 | | -5. Open your browser at http://localhost:8080 |
| 16 | +3. Build the project for production: |
18 | 17 |
|
19 | | -### Back-end: |
20 | | -1. Open up a terminal and go where you cloned the project, execute `cd back` |
21 | | -2. Run `npm install` to download the back-end dependencies |
22 | | -3. Run `npm run serve` to intialize the back-end server |
23 | | -4. The server will be initialized at port 3000 |
| 18 | +<em>Note: make sure to be at the top of the project</em> |
| 19 | + |
| 20 | +```sh |
| 21 | +npm run build-prod |
| 22 | +``` |
| 23 | + |
| 24 | +<em>This will change/create files inside `back/dist`</em> |
| 25 | + |
| 26 | +4. Push your changes to this branch: |
| 27 | + |
| 28 | +```sh |
| 29 | +git add . |
| 30 | +git commit -m "Build for production" |
| 31 | +git push |
| 32 | +``` |
| 33 | + |
| 34 | +5. Push your production code to Heroku: |
| 35 | +```sh |
| 36 | +git push heroku production:master |
| 37 | +``` |
| 38 | + |
| 39 | +6. Open in browser: https://silma.herokuapp.com |
0 commit comments