Skip to content

Instantly share code, notes, and snippets.

Created February 1, 2017 22:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/5b225aa69ce11af7b931dbf38acc0340 to your computer and use it in GitHub Desktop.
Save anonymous/5b225aa69ce11af7b931dbf38acc0340 to your computer and use it in GitHub Desktop.
docker and docker-compose files
# ./Dockerfile
FROM nginx
RUN apt-get update
EXPOSE 8080
RUN rm -vf /etc/nginx/nginx.conf
ADD ./nginx.conf /etc/nginx/nginx.conf
CMD service nginx start
# docker-compose.yml
version: "2"
services:
devlakrids:
build: ./
container_name: devlakrids
expose:
- "8080"
# ./nginx.conf
daemon off;
worker_processes 1;
events { worker_connections 1024; }
http {
# this does not help either
#resolver 8.8.8.8 valid=300s;
#resolver_timeout 10s;
sendfile on;
server {
listen 8080;
server_name dev.lakrids.premier-is.dk;
location / {
proxy_pass http://httpstat.us/;
proxy_set_header X-Real-IP $remote_addr;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment