8000 GitHub - gabeobrien/docker-lamp: A docker container for mounting a website and mysql data directories into it.
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

gabeobrien/docker-lamp

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

docker-lamp

A docker container for mounting a website and mysql data directories into it. This sets up a docker container for running a typical lamp setup. It mounts both the code for the website and the mysql data directory. If your site is configured by an .htaccess file, all you should have to do is mount both directories and configure your site to use the correct mysql server. This is the information for connecting to mysql:

  • database = app
  • user = app
  • password = app_password
  • host = 127.0.0.1

Once you have everything configured, launch the container. I happen to run unmark using this container and I have it setup on /var/unmark. The php files are at /var/unmark/app and the mysql data directory is /var/unmark/mysql. To run it, I run:

docker run -d -p 127.0.0.1:8001:80 -v /var/unmark/app:/var/www -v /var/unmark/mysql:/var/lib/mysql btobolaski/lamp

I have nginx on the Docker host setup as a reverse proxy, this is the configuration that I use.

server {
  listen 80;
  server_name unmark.tobolaski.com;
  location / {
    proxy_pass http://127.0.0.1:8001;
    proxy_redirect off;
    proxy_buffering off;
    proxy_set_header 	Host	$host;
    proxy_set_header 	X-Real-IP	$remote_addr;
    proxy_set_header	X-Forwarded-For	$proxy_add_x_forwarded_for;
  }
}

If you have a simple app, you can simply pull this from the Docker index. Its btobolaski/lamp. If you have a remotely complex app, you should probably clone this repo and modify the settings as needed.

About

A docker container for mounting a website and mysql data directories into it.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 100.0%
0