Is there a way to acces my local project from another pc - laravel

I added my laravel project to docker as it appears in the first picture.
enter image description here
And I push my images to a repository in the docker hub as it appears in the second picture.
enter image description here
Now I want to run my application on another pc, I trying to pull my images but I don't know how to run the project in the browser.
Another question is there a way to test if the project will work on another pc from my pc something like a virtual machine.

If you want your project to be accessed globally then the easiest way is to use NGROK. It requires node>=10.19.0
Two simple steps to share your locally running app with others:
//Installing ngrok globally
npm install ngrok -g
//Expose a locally running application at port 8080 to the internet.
ngrok http 8000
If you want to share locally then both the PC's should be connected to the same network and you can just type the http://{IP address of PC running APP}:{PORT} to access the application.
To check the IP address use ifconfig command. Let's say it gives you 192.168.100.1, and the app is running on port 8000. To access the app on the other PC, you have to enter the following URL in the browser:
http://192.168.100.1:8000

Related

Not able to enter Jenkins (Mac) using network IP

I'm trying to setup Jenkins on my MacMini server. I've installed it using official docs and everything works, except accessing Jenkins using local network ip. I
'm able to enter using localhost:8080, but not able to reach it from 192.168.1.X:8080 from other network device or even from the same mac server.
I've already tried instructions from this question
Accessing Jenkins on Mac OS X from another machine
but no effect.
It looks like Jenkins does not open to external connections or something. My browser finds Jenkins address, but it says "Not able to connect", just like if there is no such port (8080).
I've created a test http server, just to see if my Mac is reachable and ports are open, and everything works fine. Im able to enter an http, ssh, VNC using network address, but not able to enter Jenkins using it's port.
Does anybody knows why?

linking laravel and node app with subdomain

i currently have a running la ravel project,recently i did receive an order to make a web app for client so i made it using MEAN(mongodb,Express,Angular and Node). Unfortunately when i finished the web application the client asked for a demonstration on-line,due to huge difference in location(between me and the client) using my local development environment to showcase the working sample is not an option.i was inquiring if i could link a url from the laravel application to the node app without having to buy a domain
You can create a tunnel to your local environment by using ngrok
Follow this steps:
Download ngrok and unzip ngrok
Open a cmd / terminal and navigate to ngrok location
Type the following command:
ngrok http {your_localhost_server_port_number}
It will create the tunnel but we need to point a virtual host to it so edit your local virtual host and add an alias / server name like following:
NOTE: if you only have one app running on your local server this step is optional
*.ngrok.io
Now restart your local server to load our new configuration
Now you are able to see your localhost site online by using the ngrok provided url.
Enjoy!

Configuring PHP development environment

After a long time of using LAMP and WAMP, I've decided to try out Docker (buying new hard drives today, so why not?).
I've managed to create containers for my website and everything works fine.
Content is updated, database is saved to the folder (so kind of persistent), however, I've read that it is possible to automatically start the project containers using integration inside the PhpStorm.
And here are the problems:
I am using Windows 10 Professional with Hyper-V enabled
Docker running as a service
Docker in Windows using NPIPE (Named Pipes)
PhpStorm only works with tcp:// unix:// URI
Tried to use socat to map pipe to tcp and failed (either device is busy, or unable to send 'send' command, or any other error, you name it)
Tried to start the Docker daemon using the configuration file with hosts set to pipes and tcp - failed again (guess it is only works for Azure)
Can someone give me a link to the detailed configuration of the Docker on the Windows or should I just fallback to WAMP, because I REALLY don't want to install VMWare or VBox on my machine, neither I want to use out-of-the-box solutions for hosting local WAMP server (XAMPP, Open Server, Denver, etc), I just don't trust them.
Here's what we have:
1) https://www.jetbrains.com/help/phpstorm/docker.html
2) https://www.jetbrains.com/help/phpstorm/docker-2.html
3) https://confluence.jetbrains.com/display/PhpStorm/Docker+Support+in+PhpStorm
4) https://github.com/JetBrains/phpstorm-workshop - you can checkout docker branch. This project contains some examples/tutorials you can try right inside IDE
If that doesn't help at all - please attach/describe an error message you're getting in IDE.

Viewing Docker Compose web app on server outside host machine (the host is OSX)

My computer is OSX. I'm logged into an ssh connection (Ubuntu), and from there I'm ssh'ed into an OpenStack instance of Ubuntu 14.04. From this OpenStack instance I've been following a Docker-Compose tutorial from the Docker docs : https://docs.docker.com/compose/gettingstarted/
I'm on Step 4, and I'm successfully running a server that is running on http://0.0.0.0:5000/
However, I don't know how to view a GUI Google Chrome browser from my Macbook. Because whenever I go to http://0.0.0.0:5000/ it says server not found, which makes sense because it's not on my computer.
I read something about port forwarding, but I'm not sure that's right here. I'm fairly new, so please help!
Also, is this the right way to use an OpenStack machine? That you use your computer's web browser to view the web app?
I solved it myself. Turns out on OpenStack, you need to create a security group and then add it to your instance. When you create a security group, you can add a port that you want to provide public access to. And then you can view the web app on any computer by typing in your floating IP on OpenStack, colon separated by the public port address.

How to access Docker web app from host OS?

I've followed the tutorial on the docker.io website here:
http://docs.docker.io/en/latest/examples/python_web_app/
How would I access this app from a browser on my host OS?
Docker Remote API provides a way of accessing your Docker images and containers and performing many operations on them, through your Browser.
Here is the link for Docker API v1.6 Documentation
Hope it helps.
The tutorial explains how this works:
WEB_PORT=$(sudo docker port $WEB_WORKER 5000)
Look up the public-facing port which is NAT-ed. Find the private port used by the container and store it inside of the WEB_PORT variable.
# install curl if necessary, then ...
curl http://127.0.0.1:$WEB_PORT
Hello world!
Access the web app using curl. If everything worked as planned you should see the line “Hello world!” inside of your console.
Inside the container the application is listening on port 5000. This is translated automatically to an external port number accessible outside of the container. This makes sense because it allows multiple copies of your application to coexist on the same machine, each mapping port 5000 to a uniquely accessible port number for each app instance.
The documentation on port redirection has more details.

Resources