Skip to content
This repository has been archived by the owner on Jul 20, 2020. It is now read-only.

#170947542 setup docker #9

Merged
merged 9 commits into from
Feb 8, 2020
Merged

#170947542 setup docker #9

merged 9 commits into from
Feb 8, 2020

Conversation

Ntare22
Copy link
Contributor

@Ntare22 Ntare22 commented Feb 6, 2020

What does this PR do?
Setup Docker

Description of Task to be completed?

  • add Dockerfile
  • add dockerignore file to ignore .dockerignore

Any background context you want to provide?

  • N/A

How should this be manually tested?

  • Install docker in your local machine
  • run docker build -t barefoot-nomad .
  • run docker run -it -p 9000:3000 barefoot-nomad
  • go to your browser and check localhost:9000

What are the relevant pivotal tracker stories?
#170947542

Screenshots (if appropriate)

  • N/A

add Dockerfile
add dockerignore file to ignore .dockerignore

[ Finishes #170947542 ]
Baraka-Mugisha
Baraka-Mugisha previously approved these changes Feb 6, 2020
Copy link
Contributor

@Mnickii Mnickii left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In addition to the below review, we are missing a compose file to define our services

.dockerignore Outdated Show resolved Hide resolved
Dockerfile Outdated Show resolved Hide resolved
@Ntare22 Ntare22 requested a review from bbaime98 February 6, 2020 19:01
bbaime98
bbaime98 previously approved these changes Feb 6, 2020
remove .dockerignore file
@Ntare22 Ntare22 dismissed stale reviews from bbaime98 and Baraka-Mugisha via d9678e2 February 7, 2020 06:10
bbaime98
bbaime98 previously approved these changes Feb 7, 2020
StevenDerrick
StevenDerrick previously approved these changes Feb 7, 2020
@Mnickii
Copy link
Contributor

Mnickii commented Feb 7, 2020

Maybe add in the postgres image then this will be ready to go

Jim Ntare added 2 commits February 7, 2020 14:39
@Ntare22 Ntare22 dismissed stale reviews from StevenDerrick and bbaime98 via f19905e February 7, 2020 16:14
@Mnickii Mnickii merged commit e2164cb into develop Feb 8, 2020

COPY . /home

EXPOSE 3000

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great 👍
If you deploy this image where port 3000 is in use, the API will not be accessible and in some cases, the image will not start.
A workaround here is to have

ENV PORT 3000
EXPOSE $PORT

When running this and you need to use a different port, you will just need to export PORT=8000 or add it to the docker-compose.yaml

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will adjust in my next PR..

Mnickii pushed a commit that referenced this pull request Feb 20, 2020
* chore(setup unit testing): (#2)

install express
install chai, mocha, body-parser, @babel, nodemon, and nyc
setup babel for the project
start server in index.js file
made a test directory
write a sample test

[ Finishes #170947538 ]

* chore(HoundCI): added Hound Integration (#5)

added .hound.yml file
added a hound ReadMe badge
[Maintains #170947536]

* chore(EslintConfiguration): Added Eslint (#4)

installed eslint
configured eslintrc file
[Maintains #170947535]

* #170947543 setup heroku (#6)

* ch(setup heroku):

add node version that heroku will be running
add app.json file to create deploy button
add heroku button to README.md

[ Finishes #170947543 ]

* removed deploy button
added newline in app.json

* added heroku site to README.md

* adjusted start stript in package.json

* moved babel from devDependencies to dependencies

* adjusted my start script

* add Procfile
set 2 start scripts for development and production

* ch(database): set-up postgres, sequelize and dotenv (#1)

- install pg and pg-hstore dependencies
- install sequelize, sequelize-cli, and dotenv dependencies
- add  sequelizelrc file
- add config file  with environment variables
- add dummy data for keeping track of migrations
- add drop, create and seed scripts

[Maintains #170947533, #170947539, #170947534]

mend

 fix hound check
 add eslintignore file
 add migrations and seeder to eslintignore
 add more eslint configurations

* #170947537 Travis Integration (#7)

* chore(TravisIntegration): added travis integration
added travis yaml file
added travis badge on readme
[Maintains #170947537]

* mend

Co-authored-by: Mnickii <caroline.nkirote@andela.com>

* chore(coverage): Added coverage integration (#8)

installed coveralls
added a coveralls badge on readme
added a .coveralls.yml
[Maintains #170947540]

* bug(coverage): Fix Coveralls Integration (#11)

add a script in travis.yml for running coveralls

* #170947542 setup docker (#9)

* ch(setup docker):

add Dockerfile
add dockerignore file to ignore .dockerignore

[ Finishes #170947542 ]

* add docker-compose file
remove .dockerignore file

* add docker-compose file
remove .dockerignore file

* setup up docker ofr postgres

* correct hound error

Co-authored-by: Mnickii <caroline.nkirote@andela.com>

* #170947541 setup swagger documentation (#12)

* ch(swagger-documentation): add swagger documentation
- install dependencies
- creates swagger folder
- set up index.js file in swagger folder

[Maintains #170947541]

* ch(setup swagger):

setup swagger document in swagger directory
set up test routes

[ Finishes #170947541 ]

* fixed minor error

* fixed swagger to display

* fixed hound error

* fixed heroku issues

* fix heroku deploy

* removed comments

* fix heroku

* added message on the terminal to see what port is running

added to environment variable examples to .env.example file

Co-authored-by: Mnickii <caroline.nkirote@andela.com>

* Update README.md

* ft(signup): add signup functionality (#14)

- add signup route
- add auth controller
- add register user function
- add search in database function
- add provide token function
- add response handler functions
- add new babel config
- change start script for heroku
- add documentation
- add seed script for development

[Finishes #170947544]

* feat(i18n): Internationalization (#17)

install i18n
configure i18n
add i18n locales
[Finishes #171204720]

* #170947545 signup verification with sendgrid  (#18)

* ft(signup): add signup functionality

- add signup route
- add auth controller
- add register user function
- add search in database function
- add provide token function
- add response handler functions
- add new babel config
- change start script for heroku

[Finishes #170947544]

* ft(sign verification with SendGrid):

Create a devrepublic gmail account
Create a sendGrid account with the devrepublic gmail account
Create a Sendgrid API key
Create a email verification controller and verify Account method
Create file import SendGrid API key and send automatic email to new user

[ Finishes #170947545 ]

* change token to include id and boolean value for verification status of the user
fix bugs with updating the verication status of the user

[ Finishes #170947545 ]

* fix npm start

* feat(login): Adds login feature (#15)

add login tests
add login controller
write bcrypt handler
write a token encoder
create a login route
[Maintains #170947547]

* #171281019 create email verification tests  (#21)

* add a verification test

* ch(create email verification-tests):

adjusted token to accept email, id, and isVerified fields
adjusted verification controller to do away with checking the verification table
deleted the verification table
created a new file in validations with validateParams calls to validate the token in verification
created email verification tests

[ #Finishes #171281019 ]

* fix hound error

* added swagger documentation

* ft(logout): add log out functionality (#20)

- add a log-out route
- add a logout function
- add logout tests
- change authController to userController
- change authRoute to userRoutes

[Finishes #170947550]

* feat(userRoles): User Roles Settings (#24)

add roles field in the user database
added internationalized messages
seeded a default admin
add the update roles controller and routes
add the feature's tests and documentation
[Finishes #170947557]

* feature(reset): reset password feature (#23)

- add the forgot password endpoint
- add the reset password endpoint
- configured sendGrid to send email
- add the verify token function
- add the send email function

[finishes #170947549]

* #170947548 Login with Facebook and Google (#22)

* ft(Login with Facebook and Google):

Install passport, passport-facebook, and passport-google-oauth
Setup apps on google developer console and facebook facebook developer
Write passport configuration file with facebook and google
create a getProfile callback function.
Setup routes for google and facebook redirecting
Initialise passport in index.js

[ #170947548 in progress]

* minor changes to the facebook oauth

* fixed facebook

* fixed tests

* fixed some bugs in the controller
wrote tests for the controller

[ Finishes #170947548 ]

 Please enter the commit message for your changes. Lines starting

* ft(profile): add profile settings functionalities (#25)

- add edit profile route
- add view profile route
- add edit profile route
- add upload profile picture route
- add edit profile funciton
- add view profile function
- add upload image function
- add the feature's tests and documentation
[Finishes #170947551]

* ft(create accommodation facilities): (#28)

setup table with sequelize
create routes to the controller
create controller for adding facilities and rooms
write tests for the controllers

[ Finishes #170947569 ]

* ft(profile): add profile settings functionalities (#25) (#26)

- add edit profile route
- add view profile route
- add edit profile route
- add upload profile picture route
- add edit profile funciton
- add view profile function
- add upload image function
- add the feature's tests and documentation
[Finishes #170947551]

Co-authored-by: bbaime98 <52517921+bbaime98@users.noreply.github.com>

* feature(trip): request return trip (#29)

- add the request return trip controller and route
- added test for the feature
- add the protect routes middleware
- changed the reset route to follow conventions
- modified the reset feature swagger documentation

[Maintains #170947553]

Co-authored-by: Jim Ntare <jim.ntare@andela.com>
Co-authored-by: Baraka <41383503+Baraka-Mugisha@users.noreply.github.com>
Co-authored-by: bbaime98 <52517921+bbaime98@users.noreply.github.com>
Co-authored-by: ISHIMWE Steven <steven.ishimwe@andela.com>
Co-authored-by: izzett222 <51261911+izzett222@users.noreply.github.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants