Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Containerize application #195

Closed
5 tasks done
JamalG16 opened this issue Jan 17, 2020 · 0 comments
Closed
5 tasks done

Containerize application #195

JamalG16 opened this issue Jan 17, 2020 · 0 comments

Comments

@JamalG16
Copy link
Collaborator

JamalG16 commented Jan 17, 2020

As a developer, I would like to containerize the application.

Technology to be used is docker.

  • Create Dockerfile for /frontend
  • Create frontend service in docker-compose.yaml
  • Create Dockerfile for /backend
  • Create backend service in docker-compose.yaml
  • Update README with instructions on how to run the application with docker.

IMPORTANT NOTES FROM SETUP:

  • run docker-machine ip default to get the ip-address of docker machine (if you still want to use localhost, you must enable port forwarding. If you use docker toolbox, you can follow this: https://stackoverflow.com/a/45822356). Currently, project is setup assuming port forwarding is put in place as the phone must be connected to same wireless network as expo.
  • create and build container and build/rebuild services docker-compose up --build from project root
  • create and build container docker-compose up from project root
  • Stop and remove containers, networks, images, and volumes, run docker-compose down -v from project root
  • To delete docker containers and optionally delete cache docker system prune -a (remove -a if you do not want to delete cache)

DISCOVERED BUGS:

  • When trying to run the application, animated node type param not supported natively is an error that occurs if node modules are downloaded from within the docker virtual machine. However, if node_modules are based on the local node_modules (with the use of volumes), then it works. No solution was found for this issue and many hours of debugging were spent to no avail. Ultimately, even though this is counter intuitive, node_modules will have to be installed locally by running npm install in the /frontend directory of the project, then docker-compose up can be ran to successfully load the application. The issue seems to be related to the Drawer component, as it requires the react-native-reanimated package, which seems to be the root of the issue.
    RESOLVED by upgrading packages and dependencies

  • Polling/hot reloading for the frontend is not functional. Polling dependencies such as CHOKDIR were integrated and tested, but to no avail. The environment was modified to attempt fixing this, but to no avail either. Would require more investigation to pursue full development using docker.

[SP: 8]
[Priority: High]
[Risk: Medium]

@JamalG16 JamalG16 added this to the Iteration 8 (Release 2) milestone Jan 17, 2020
@JamalG16 JamalG16 self-assigned this Jan 17, 2020
JamalG16 added a commit that referenced this issue Jan 20, 2020
JamalG16 added a commit that referenced this issue Jan 21, 2020
JamalG16 added a commit that referenced this issue Jan 21, 2020
JamalG16 added a commit that referenced this issue Jan 21, 2020
JamalG16 added a commit that referenced this issue Jan 21, 2020
MickeyPa added a commit that referenced this issue Jan 26, 2020
Resolved Conflicts

* master: (193 commits)
  [#192] added missing test and slightly refactored
  [#195] bug fixes, upgraded dependencies and updated readme
  [#195] added readme info
  [#195] reverted
  [#195] slight changes
  [#195] frontend dockerfile, added frontend service in docker-compose file and updated readme
  [#195] backend dockerfile and docker-compose file created which includes service for backend
  [#176] cleaned up more TSLint
  [#176] fixed filter problems
  [#176] Refactor work order status enum
  [#192] created user service unit tests, made authutils and hashutils into classes, refactored code and underlying bugs and fixed lint issues
  Grammer :(
  [#192] slightly refactored property service test:
  fixing issue with naming
  deleting the lower case file
  refactor
  [#29]PR reviews
  [#192] property service unit tests, refactored, fixed lint issues, removed redundant code & fixed small underlying bugs
  Fix
  Fixes
  ...

# Conflicts:
#	backend/src/constants/BodyFields.ts
#	backend/src/constants/FindOptionsFields.ts
#	backend/src/controllers/index.ts
#	backend/src/entity_mappers/WorkOrderMapper.ts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant