@@ -355,57 +355,83 @@ ___
355
355
356
356
### EXECUTION INSTRUCTIONS
357
357
358
- #### EXECUTION INSTRUCTIONS TO DOCKERIZED APP
358
+ #### EXECUTION INSTRUCTIONS TO DOCKERIZE THE APP
359
359
360
360
Firstly, install Docker in your computer. (You can download this program on: https://www.docker.com/get-started/ )
361
361
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/
364
367
365
368
#### DOCKER IMAGE CONSTRUCTION
366
369
367
370
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.
368
371
369
372
Create an account in DockerHub and execute in your command console:
370
- ` $ docker login `
371
373
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.
373
381
374
382
375
383
#### DEPLOYMENT IN HEROKU
376
384
377
- Deployment documentation (in Heroku)
378
385
If you aren't signed up in Heroku, create a new account in https://signup.heroku.com/
379
386
Before all, execute in your command console:
380
387
381
- ` $ heroku login `
382
- ` $ heroku container:login `
388
+ ``` $ heroku login ```
389
+
390
+ ``` $ heroku container:login ```
383
391
384
392
Execute these commands
385
- ` $ heroku create <application_name> `
393
+
394
+ ``` $ heroku create <application_name> ```
395
+
386
396
(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
+
388
400
(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
+
391
406
(These commands stablish some environment variables)
407
+
392
408
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
+
394
412
(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
+
396
416
(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
+
398
420
(Pushes it into Heroku private registry)
399
- ` $ heroku container:release web -a <application_name> `
421
+
422
+ ``` $ heroku container:release web -a <application_name> ```
423
+
400
424
(Releases the web app)
401
- ` $ heroku logs --tail -a <application_name> `
425
+
426
+ ``` $ heroku logs --tail -a <application_name> ```
427
+
402
428
(Optional. This one allows you to see the information related to the app on your commands console)
403
429
404
430
405
431
#### HEROKU LINK
406
432
407
433
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:
409
435
410
436
* CLIENT
411
437
0 commit comments