Created
June 10, 2015 08:10
-
-
Save fntlnz/de5d5861fa4d86f9598c to your computer and use it in GitHub Desktop.
Drone on Docker With Nginx and Drone Wall
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
drone: | |
image: drone/drone | |
restart: always | |
privileged: true | |
volumes: | |
- /data/drone:/var/lib/drone | |
- /var/run/docker.sock:/var/run/docker.sock | |
environment: | |
- DRONE_SESSION_SECRET=yoursessionsecrethere | |
- DRONE_GITHUB_CLIENT=yourgithubclientkey | |
- DRONE_GITHUB_SECRET=yourgithubsecretkey | |
- DRONE_REGISTRATION_OPEN=true | |
- DRONE_WORKER_NODES=unix:///var/run/docker.sock,unix:///var/run/docker.sock | |
nginx: | |
image: fntlnz/nginx | |
restart: always | |
ports: | |
- 0.0.0.0:80:80 | |
links: | |
- drone:drone | |
- wall:wall | |
volumes: | |
- nginx.conf:/usr/local/nginx/conf/nginx.conf | |
- /var/log/nginx:/var/log/nginx | |
wall: | |
image: scottwferg/drone-wall | |
restart: always | |
environment: | |
- API_SCHEME=http | |
- API_DOMAIN=drone.local | |
- API_TOKEN=<yourdroneapitoken> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
worker_processes auto; | |
pid /var/run/nginx.pid; | |
error_log /var/log/nginx/error.log; | |
worker_rlimit_nofile 2048; | |
events { | |
worker_connections 2048; | |
} | |
http { | |
server_names_hash_bucket_size 64; | |
default_type application/octet-stream; | |
log_format main '$remote_addr - $remote_user [$time_local] "$request" $status $body_bytes_sent "$http_referer" "$http_user_agent" "$http_x_forwarded_for"'; | |
access_log /var/log/nginx/access.log main; | |
sendfile on; | |
client_max_body_size 20m; | |
keepalive_timeout 20; | |
gzip on; | |
gzip_comp_level 6; | |
gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript application/javascript text/x-js image/svg+xml; | |
charset utf-8; | |
server_tokens off; | |
types { | |
text/html html htm shtml; | |
text/css css; | |
text/xml xml rss; | |
image/gif gif; | |
image/jpeg jpeg jpg; | |
application/x-javascript js; | |
} | |
server { | |
listen 80; | |
server_name drone.local; | |
access_log /var/log/nginx/drone.access.log; | |
error_log /var/log/nginx/drone.error.log; | |
location / { | |
proxy_pass http://drone:80; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $remote_addr; | |
proxy_set_header Host $http_host; | |
proxy_set_header Origin ""; | |
proxy_redirect off; | |
proxy_http_version 1.1; | |
proxy_set_header Upgrade $http_upgrade; | |
proxy_set_header Connection "upgrade"; | |
} | |
} | |
server { | |
listen 80; | |
server_name wall.drone.local; | |
access_log /var/log/nginx/wall.access.log; | |
error_log /var/log/nginx/wall.error.log; | |
location / { | |
proxy_pass http://wall:3000; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $remote_addr; | |
proxy_set_header Host $http_host; | |
proxy_set_header Origin ""; | |
proxy_redirect off; | |
proxy_http_version 1.1; | |
proxy_set_header Upgrade $http_upgrade; | |
proxy_set_header Connection "upgrade"; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment