Sample project using two linked docker containers
-
static-server: An nginx proxy that checks if a file exists on the filesystem for the current URI and serves it, or proxies the request to an application server otherwise. E.g.
GET /some/route
->/static_root/some/route.html
. -
api_server: Very simple test application receiving the proxied requests.
-
Make sure to have docker installed and running.
(Archlinux)pacman -S docker && systemctl start docker
-
Fetch both docker images. (TODO)
docker pull olanod/test-api-server olanod/test-static-server
-
or Build the images
docker build olanod/test-api-server .
(from api-server)
docker build olanod/test-static-server .
(from static-server) -
Run to test the created containers
docker run --name api-server olanod/test-api-server
docker run -p 80 --link api-server olanod/test-static-server