How to set up a docker-compose and Dockerfile to deploy a Laravel app? - docker-compose

I recently finished developing a Laravel 9 app, using wsl2 and sail, just like I was told in the Laravel documentation. Since it’s my first time deploying to live ever, I ran into some differences with local and production files such as .env, docker-compose.yml and Dockerfile.
I tried using guides and tutorials but I can’t seem to make sense as to how to make it work. I have a droplet with a non-root user with sudo privileges, since I used these two kind guides:
https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-on-ubuntu-20-04
https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-compose-on-ubuntu-20-04
after finishing with the installation, I tried to clone my app and run it like I do locally, and nothing happened. I realize I can’t use sail on the server, but what is the correct way to make it work?
All three local files (.env, docker-compose.yml and Dockerfile) were never edited.

use this repository docker-laravel
i have Php, Composer, and mariadb on it.

Related

Deploy magento2 on a kubernet cluster

I run magento 2 on my local with docker.
It works like a charm.
But now I would like to pass the next step, and deploying a registry image of my magento2 (gitlab registry with gitlab-ci in my case) in a k3d cluster in my personal server.
I don't have any problems to generate the image in the registry of gitlab and to deploy the service, the node, the pod with kube in my server. To train myself and to be sure that what I did was correct, I have tried to deploy an other image in my cluster from the gitlab registry from a little simple HTML and a Dockerfile and it works like a charm.
But the magento 2 image no. The problem is that we must play the setup / compile / etc. When I try to play composer install in my entrypoint it says in the logs pod that there is no composer.json in the folder where composer is supposed to be. So I guess I must configure ingress.yaml, services and deployment with a specific way. I don't know where to start and how.
My question is just, if someone know a good tuto or some documentations links I would be pleased to see that.
I have heard about helm, the hooks etc...but I don't handle it at all. I even don't know what it is...
Thank you
Thanks

How to deploy angular2 on tomcat?

First I'd like to describe my set up:
I have a web service, let's call it "Cars", written in Java, that I've tested in eclipse with tomcat v6, working local (it was a requirement, so that once it works locally I can switch to do it with a "real" tomcat server so others can access). It works, it access the database, it offers an answer for certain URIs and so on.
I have coded in Plunker an angular 2 application, "WebCar", and I now want to run that on my computer, with a Tomcat server (unless there is a better way of doing it, I've been told to do it with Tomcat. Since I do not know any better option, that's why I talk about tomcat all of the time). With eclipse, I have already managed to get the app running, using palantir plugin for typescript https://marketplace.eclipse.org/content/typescript , and then running the project with a server-launch.js which contains require('lite-server'); , this allows me to see the same I saw on plunker, so, it works, but before I upload anything to the business servers I wanted to check everything works (hence the set up, which may not be necessary but it's what I come up with).
I now want to go one step further and use, if possible, tomcat v6 to run my angular 2 app, instead of simply using that lite server, so that I can test that it works, and then uploading it to a "real", remote server.
I would like to know what options are there, what would be a better option, and anything that is required to make an angular 2 deployment properly. So far I've found this
https://stackoverflow.com/a/34408495/6028947 " You only have to deploy
.js files, since anyway browser won;t" which I don't fully get,
http://jspm.io/ which is for SystemJS (I have an older version of
Angular 2 and use config.js)
https://stackoverflow.com/a/37568235/6028947 which talks about
angular-cli or webpack, which makes a bundle but if I got that
running, I still don't know what to do with it to upload to Tomcat
and then connect it to my web service.
So maybe the question should be (I don't know for sure): Once you get your angular 2 code bundled, what's next?
Btw there are a few other questions on stackOverflow, similar to this, but as far as I've seen, without any answer at all or with answers only obliquely related to this (and of course, nothing resembling a guide or step by step required)
Thanks to #nuzz for this ..
I'm running a little script to build the project and then copy it to tomcat. I'm telling angular what the base directory is that it will run under in tomcat.
#!/bin/sh
ng build --base-href /angular/ --prod
mkdir -p /home/xxx/apache-tomcat-8.0.37/webapps/angular
cp -R /home/xxx/angular-clitest/dist/* /home/xxx/apache-tomcat-8.0.37/webapps/angular/
Once thats run, start tomcat and you can access it at: http://localhost:8080/angular

swift Perfect server deployment in Amazon AWS Buildpack

Am trying to deploy my web service written in swift, I don't see the web-root folder and not sure where to create the folder. Anybody have tried, please help me to copy the source code and start the server.
so, can you tell me what you have done so far, in relation to getting the AWS instance up and running ? Did you use the AWS instructions from here?
Once you have the instance up and running, there are several ways to deploy your code, such as a git pull. By default, the webroot folder for the PerfectServer is created in the current working directory when you run the app. There are several command line options to define the location of libraries, server port and location of webroot.
With more information, I'd be happy to help get you running.

Deploying Meteor App to own server

I have a completed meteor project and is currently deployed on the meteor website. I would like to move it to my own website, which is currently hosted by GoDaddy.
How do I install Node and Mongo on my server (linux) and then run my meteor project? I received ssh access to my server, so I assume I can do this, but I'm just not sure how.
So how exactly do I proceed?
Additional Info:
I'm not exactly sure what of linux it is. On GoDaddy, it simply says linux.
When I ssh, it shows me:
-bash-3.2$:
Also, I having my website simply show the myapp.meteor.com webpage would work too. An explanation on how to do this would work.
Discover Meteor has a chapter on deployment which helps to answer this question. For ubuntu-based servers they recommend meteor-up. I haven't used it, but it's probably worth checking out. Previous versions of the book recommended meteoric.
I wrote my own set of bash scripts using a few ideas from meteoric, but I already had a lot of experience doing deployment scripting. Frankly there's nothing quite like figuring it all out yourself, but doing sysadmin tasks doesn't appeal to everyone and it can be hard to pick up in a hurry.

How to debug custom slug crashing

For various reasons we have decided to try to sidestep the slug-compilation and build our own slug locally to deploy through the API (as described here: https://devcenter.heroku.com/articles/platform-api-deploying-slugs).
The slug is built mostly like the java/scala buildpack using that buildpack jvm and is then combined with our play framework application dist file. Looking at the app dir of a normal/git-deployed app it looks aboutish the same.
Now, after deploying the slug through the api we get the expected dynos listed in the config page but the app crashes right away without giving any further information. Trying to attach a bash shell through heroku run bash it just times out.
Is there any way to get more information about why the app crashed out of heroku?
Ok, after some help from heroku support we figured out the following:
The slug tar files must be created so that the paths start with './' regular relative paths doesn't cut it. When we had that figured out we didn't really have any more big problems and now we have got a working alternative build and deploy to heroku pipeline that allows us to build or app locally and then deploy that.