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

Deploying to Production #143

Open
AmandaDLyon opened this issue Sep 1, 2020 · 4 comments
Open

Deploying to Production #143

AmandaDLyon opened this issue Sep 1, 2020 · 4 comments
Labels
discussion Discuss if certain features are needed

Comments

@AmandaDLyon
Copy link

AmandaDLyon commented Sep 1, 2020

Describe the bug
I am not able to upload the site to a domain name. It does not load anything. How do I push this to a public server?

I am running the whole thing as a docker container and then I have NGINX installed on my server for reverse proxy.

@Viveckh @smaharj1

@smaharj1
Copy link
Collaborator

smaharj1 commented Sep 1, 2020

I am not quite sure what you are doing for your deployment. How you deploy totally depends on you. For web applications, you can use nginx or even S3 if you want since its just set of static files.

For server, you just need to run the servers and expose that port. If you want nginx, that is fine too. Just make sure that when you deploy, your servers run and domains are connected to correct ports.

@AmandaDLyon
Copy link
Author

@smaharj1 So I have simply put all my code on a server and run docker-compose up then I installed NGINX and reverse proxy'd ports 5201 and 5202 to point to demo.com and admin.demo.com

I am not sure how to build for production. How do you deploy this to the internet?

I see that in management-webclient and in shopping-webclient, there is a file called vue.config.js in which there are paramenters called "host" and "port" and so on.

Could you please guide me on how to deploy this to a domain name? You can also share your nginx configuration file.

That will be of great help.

Thanks.

@Viveckh
Copy link
Owner

Viveckh commented Sep 3, 2020

So ideally if you are deploying in prod, it might be a wise idea to decouple the components of the application and deploy them separately. The docker-compose one-command startup was put together for developers to quickstart, so it might not be entirely thought-through for production use.

For example - this is how we deploy our demo sites.

  • The web clients for shop.veniqa.com and admin.veniqa.com are deployed through Netlify as separate apps. The free tier has served us well to handle traffic for up to tens of thousands of visitors at certain peak times during Veniqa's history.

  • We have CD/CI integrations set up such that every merge on develop and master branches in our Github auto-triggers a fresh docker image build on Dockerhub for the server components. The dockerfiles living within each server codebase will come into use here.

  • The two servers are deployed as separate apps on Microsoft Azure. They pick up the individual docker images built on DockerHub above for the two servers. We only open access to our front end domains, so our servers decline requests from any other domain. The config files on our backends to enable this, so make sure to make use of that.


Correct me if I'm wrong on the following part @smaharj1

The vue.config.js files come in handy to point to the base URL to route the backend requests to. But I believe the .env files on the frontend are what is actually used now and these vue config files are actually deprecated.

@Viveckh Viveckh changed the title BUG Deploying to Production Sep 3, 2020
@Viveckh Viveckh added the discussion Discuss if certain features are needed label Sep 3, 2020
@AndrewMcSwain
Copy link

@AmandaDLyon keep us posted about your progress, and if you don't mind post the link to your work when it goes to production!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion Discuss if certain features are needed
Projects
None yet
Development

No branches or pull requests

4 participants