GeriLife / wellbeing-client

Client-only code for Wellbeing project.
Apache License 2.0
0 stars 0 forks source link

Deployment script #19

Open shailee-m opened 3 years ago

shailee-m commented 3 years ago

We need to deploy the Meteor backend and Vue.js frontend to a single domain, such as example.com. When a user visits "example.com" the Vue.js frontend would render and connect to the Meteor backend on the same server.

We have been using the Meteor Up project (MUP) for deployment. MUP basically builds a Docker container from a Meteor project source code and deploys it to a pre-configured server (with nginx and MongoDB already installed). MUP can be extended to add hooks, custom Docker options, and nginx reverse proxy config, which might be useful for our deployment purposes.

Ideally, deploying the GeriLife client/server code would be as simple as a single command.

shailee-m commented 3 years ago

@brylie Do we have a deployment platform? nginx or apache?

brylie commented 3 years ago

@shailee-m we should probably just target Docker. Nginx is fine. Let's encrypt, if possible.

brylie commented 3 years ago

It might be useful to replace the previous wellbeing frontend with this code, e.g. as a Git submodule. I think this new UI supersedes the previous UI that was built with Blaze.

brylie commented 3 years ago

Could the old platform be updated to include this new UI in it's build?

shailee-m commented 3 years ago

@brylie yes I am trying to redirect to vue from meteor itself. Will update you soon

brylie commented 3 years ago

Thanks Shailee

shailee-m commented 3 years ago

@brylie Meteor is not rendering custom HTML from meteor server. It is okay if the submodule project is started on a separate server? We can remove the client code from meteor as only meteor server code is required.

brylie commented 3 years ago

That would be fine as long as the user doesn't have to think about which server they are connecting to when visiting the app in a browser.

brylie commented 3 years ago

@shailee-m what is the status of this task?

The goal here is to have a single command that deploys the client and backend code to the same server. The client should be served as the default frontend (deprecating the old Blaze UI). The client will then automatically connect to the backend project running on a different port.

From the end user perspective, they will just access the website as normal. I.e. they should not be aware that the client code is connecting to a backend service on the same domain.

shailee-m commented 3 years ago

@shailee-m what is the status of this task?

The goal here is to have a single command that deploys the client and backend code to the same server. The client should be served as the default frontend (deprecating the old Blaze UI). The client will then automatically connect to the backend project running on a different port.

From the end-user perspective, they will just access the website as normal. I.e. they should not be aware that the client code is connecting to a backend service on the same domain.

@brylie In this PR there is a common deployment command and related docs for deployment. https://github.com/GeriLife/wellbeing/pull/572

Can we connect once to check the meteor deployment part? As my local docker config has some issues, I want to make sure it works in the deployment environment.

The docker deployment for the Vue project was merged in this PR: https://github.com/GeriLife/wellbeing-client/pull/28

brylie commented 3 years ago

@shailee-m I've moved the common deployment scripts to a separate repository, and opened a pull request:

https://github.com/GeriLife/wellbeing-deploy/pull/1

Please feel free to continue from that pull request.

We can have a call today or tomorrow to discuss the issue further.