Skip to content

Commit f76d4be

Browse files
Code blocks in Readme
1 parent f2a22f8 commit f76d4be

File tree

1 file changed

+44
-18
lines changed

1 file changed

+44
-18
lines changed

README.md

Lines changed: 44 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -355,57 +355,83 @@ ___
355355

356356
### EXECUTION INSTRUCTIONS
357357

358-
#### EXECUTION INSTRUCTIONS TO DOCKERIZED APP
358+
#### EXECUTION INSTRUCTIONS TO DOCKERIZE THE APP
359359

360360
Firstly, install Docker in your computer. (You can download this program on: https://www.docker.com/get-started/)
361361
Next, open command console. Change your working directory to the file where docker-compose.yml is. (/docker)
362-
Execute $ docker-compose up.
363-
Once the app is running open in your browser https://localhost:8443/
362+
Execute
363+
364+
```$ docker-compose up```
365+
366+
Once the app is running, open in your browser on https://localhost:8443/
364367

365368
#### DOCKER IMAGE CONSTRUCTION
366369

367370
You need to log in to DockerHub before you execute the create_image.sh script. This script creates the new image and pushes it to DockerHub.
368371

369372
Create an account in DockerHub and execute in your command console:
370-
` $ docker login `
371373

372-
Execute .create_image.sh ` <username>/<name_of_the_new_image> `
374+
``` $ docker login ```
375+
376+
Execute
377+
378+
``` $ ./create_image.sh <name_of_the_new_image> ```
379+
380+
Note that you must edit the script in order to **add your DockerHub user**. If not, you won't be able to upload the image.
373381

374382

375383
#### DEPLOYMENT IN HEROKU
376384

377-
Deployment documentation (in Heroku)
378385
If you aren't signed up in Heroku, create a new account in https://signup.heroku.com/
379386
Before all, execute in your command console:
380387

381-
` $ heroku login `
382-
` $ heroku container:login `
388+
``` $ heroku login ```
389+
390+
``` $ heroku container:login ```
383391

384392
Execute these commands
385-
` $ heroku create <application_name> `
393+
394+
``` $ heroku create <application_name> ```
395+
386396
(Creates a new application on Heroku)
387-
` $ heroku addons:create heroku-postgresql --app <application_name> `
397+
398+
``` $ heroku addons:create heroku-postgresql --app <application_name> ```
399+
388400
(Adds the postgresql database to the application)
389-
` $ heroku config:set SERVER_SSL_ENABLED=false --app <application_name> `
390-
` $ heroku config:set SPRING_JPA_HIBERNATE_DDL-AUTO=update --app <application_name> `
401+
402+
``` $ heroku config:set SERVER_SSL_ENABLED=false --app <application_name> ```
403+
404+
``` $ heroku config:set SPRING_JPA_HIBERNATE_DDL-AUTO=update --app <application_name> ```
405+
391406
(These commands stablish some environment variables)
407+
392408
If you haven't uploaded the app image to DockerHub is time to do it ;).
393-
` $ docker pull <dockerHub_image_name> `
409+
410+
``` $ docker pull <dockerHub_image_name> ```
411+
394412
(Downloads the image from DockerHub)
395-
` $ docker tag <dockerHub_image_name> registry.heroku.com/<application_name>/web `
413+
414+
``` $ docker tag <dockerHub_image_name> registry.heroku.com/<application_name>/web ```
415+
396416
(Prepares it to be pushed to Heroku)
397-
` $ docker push registry.heroku.com/<application_name>/web `
417+
418+
``` $ docker push registry.heroku.com/<application_name>/web ```
419+
398420
(Pushes it into Heroku private registry)
399-
` $ heroku container:release web -a <application_name> `
421+
422+
``` $ heroku container:release web -a <application_name> ```
423+
400424
(Releases the web app)
401-
` $ heroku logs --tail -a <application_name> `
425+
426+
``` $ heroku logs --tail -a <application_name> ```
427+
402428
(Optional. This one allows you to see the information related to the app on your commands console)
403429

404430

405431
#### HEROKU LINK
406432

407433
The link needed in order to access to the Heroku app ![](https://codeurjc-daw-2021-22-webapp3.herokuapp.com/)
408-
In order to test the app, as there are different types of users, these are some examples:
434+
There are different types of users to test the app. These are some examples:
409435

410436
* CLIENT
411437
* Client name: [email protected]

0 commit comments

Comments
 (0)