digital-ocean

How do I set up global load balancing using Digital Ocean DNS and Nginx?

不羁岁月 提交于 2019-12-02 14:04:52
UPDATE: See the answer I've provided below for the solution I eventually got set up on AWS. I'm currently experimenting with methods to implement a global load-balancing layer for my app servers on Digital Ocean and there's a few pieces I've yet to put together. The Goal Offer highly-available service to my users by routing all connections to the closest 'cluster' of servers in SFO, NYC, LON, and eventually Singapore. Additionally, I would eventually like to automate the maintenance of this by writing a daemon that can monitor, scale, and heal any of the servers on the system. Or I'll combine

CORS issue with canvas only when image is preloaded

爱⌒轻易说出口 提交于 2019-12-02 10:54:34
My issue only arises when the loaded image was preloaded somewhere else. For example, when I somewhere use a <img> -tag with the src attribute. Have a look at this code: <canvas id="myCanvas" width="300" height="150" style="border:1px solid #d3d3d3;" ></canvas> <img src="https://local-spaces.fra1.digitaloceanspaces.com/test.jpg" width="50"/> <button onclick="show()">Load Canvas Picture</button> <script> function show() { const c = document.getElementById("myCanvas"); const ctx = c.getContext("2d"); const img = new Image(); img.setAttribute('crossOrigin', 'anonymous'); img.onload = function(){

Digital ocean kubernetes cluster connection error

爱⌒轻易说出口 提交于 2019-12-02 09:33:14
I have created kubernetes cluster on digital ocean having 1 worker node and one master node. As per digital ocean guide line i followed step and download kubernetes cluster config file kubectl --kubeconfig="filename.yaml" get nodes but it is showing Unable to connect to the server: unexpected EOF While Kubernetes cluster is Up and Running Please make sure you are using right config yaml file otherwise try to destroy and create fresh Kubernetes cluster on Digital Ocean and try again. It should work properly In my case i have blinding fire cluster more thn 10-11 time with different configuration

apache not returning index.php as default

寵の児 提交于 2019-12-02 08:58:51
I recently made a DigitalOcean droplet with LAMP pre-installed. Went and uploaded my website (including index.php) to /var/www Apache just returns the It Works! page, I have to manually add /index.php to my url Things I have tried: Made an .htaccess file containing "DirectoryIndex index.php" Adding DirectoryIndex index.php to apache2.conf Set index.php first in dir.conf Making an index.html, didn't show that either. EDIT: here's my apache2.conf file: http://pastebin.com/BMgiNdiD You are missing following configuration: # # DirectoryIndex: sets the file that Apache will serve if a directory #

Laravel installed, but connection is reset / No data received

牧云@^-^@ 提交于 2019-12-01 18:05:46
I am using Digital Ocean as my server, I have a Ubuntu droplet running laravel fine on my site. But now I am making a 'projects backend' where there is just a folder with test projects that are all laravel projects themselves. They are not linked to the main laravel install. I installed it, all the files are there if I go to www.mysite.com/projects/projectname it shows: But when I go to the link www.mysite,com/projects/projectname/public it shows: in firefox in chrome The site is working fine on my laptop using mamp. But not on the server? If I look in charles (the proxy manager) I get the

Laravel installed, but connection is reset / No data received

大兔子大兔子 提交于 2019-12-01 17:31:16
问题 I am using Digital Ocean as my server, I have a Ubuntu droplet running laravel fine on my site. But now I am making a 'projects backend' where there is just a folder with test projects that are all laravel projects themselves. They are not linked to the main laravel install. I installed it, all the files are there if I go to www.mysite.com/projects/projectname it shows: But when I go to the link www.mysite,com/projects/projectname/public it shows: in firefox in chrome The site is working fine

How Can I run PM2 with Angular-Cli? - Angular2

泪湿孤枕 提交于 2019-12-01 03:36:57
How can I run: ng serve --prod with pm2? ng serve from angular-cli, Angular2. I'm running on DigitalOcean. I have tried to test with http-server -p 4200 -d false in the dist/ folder after ng build --prod When I request from the domain https://www.unibookkh.com/ , i got 404 error: (I've already setup nginx to listen to port 4200. I test with http-server because I think I maybe can run pm2 through this command pm2 start my_app_process.json where my_app_process.json { "apps": [ { "name": "angular", "cwd": "~/angular2", "args": "-p 4200 -d false", "script": "/usr/bin/http-server" } ] } Any better

Simple node.js app deployment on DigitalOcean from GitHub

你说的曾经没有我的故事 提交于 2019-12-01 01:17:52
I have a node.js application on my Github. Right now I am using Heroku for hosting it but I want to give DigitialOcean a try (the $5/month is more affordable). I am used to using Heroku, where I just go create an app > connect it to my github account > deploy from the master branch > boom app deployed. When I signed up for DO and started exploring it seemed way too much and too many steps to get my app deployed. I researched around to find a simpler way (similar to one I follow in Heroku) but all the blogs and YouTube videos go through the same tedious process. I know I am being lazy but I

Memory issue with meteor up (mup) on Digital Ocean

走远了吗. 提交于 2019-12-01 01:02:57
I couldn't find existing posts related to my issue. On a Digital Ocean Droplet, mup setup went fine, but when I try to deploy, I get the following error. Any ideas? Thanks! root@ts:~/ts-deploy# mup deploy Meteor Up: Production Quality Meteor Deployments Building Started: /root/TS/ Bundling Error: code=137, error: -------------------STDOUT------------------- Figuring out the best package versions to use. This may take a moment. -------------------STDERR------------------- bash: line 1: 31217 Killed meteor build --directory /tmp/dc37af3e-eca0-4a19-bf1a-d6d38bb8f517 Below are the logs. node -v

Expose port 80 on Digital Ocean's managed Kubernetes without a load balancer

我与影子孤独终老i 提交于 2019-11-30 23:18:31
I would like to expose my Kubernetes Managed Digital Ocean (single node) cluster's service on port 80 without the use of Digital Ocean's load balancer. Is this possible? How would I do this? This is essentially a hobby project (I am beginning with Kubernetes) and just want to keep the cost very low. Thank you in advance! -Joe You can deploy an Ingress configured to use the host network and port 80/443. DO's firewall for your cluster doesn't have 80/443 inbound open by default. Open them at https://cloud.digitalocean.com/networking/firewalls Create the nginx ingress using the host network. I've