Skip to content

Commit

Permalink
Reverse Proxy for Jenkins-deb on docker-compose
Browse files Browse the repository at this point in the history
  • Loading branch information
cradle8810 committed Oct 28, 2024
1 parent b1295e5 commit af8fab1
Show file tree
Hide file tree
Showing 3 changed files with 69 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
services:

Check failure on line 1 in tasks/dockerservice/home/hayato/compose/jenkins-deb/docker-compose.yml

View workflow job for this annotation

GitHub Actions / AnsibleLint

schema[tasks]

$ {'services': {'jenkins-deb-container': {'container_name': 'jenkins-deb-container', 'image': 'nginx:latest', 'restart': 'always', 'stdin_open': True, 'tty': True, 'networks': ['reverse-proxy'], 'volumes': ['jenkins_deb:/usr/share/nginx/html']}}, 'volumes': {'jenkins_deb': None}, 'networks': {'reverse-proxy': {'external': True}}} is not of type 'array', 'null'
jenkins-deb-container:
container_name: jenkins-deb-container
image: nginx:latest
restart: always
stdin_open: true
tty: true
networks:
- reverse-proxy
volumes:
- jenkins_deb:/usr/share/nginx/html

volumes:
jenkins_deb:

networks:
reverse-proxy:
external: true
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
services:

Check failure on line 1 in tasks/dockerservice/home/hayato/compose/reverseproxy/docker-compose.yml

View workflow job for this annotation

GitHub Actions / AnsibleLint

schema[tasks]

$ {'services': {'reverseProxy': {'container_name': 'reverse-proxy', 'image': 'nginx:latest', 'restart': 'always', 'stdin_open': True, 'tty': True, 'ports': ['80:80'], 'volumes': ['./nginx.conf:/etc/nginx/nginx.conf:ro'], 'networks': ['reverse-proxy']}}, 'networks': {'reverse-proxy': {'external': True}}} is not of type 'array', 'null'
reverseProxy:
container_name: reverse-proxy
image: nginx:latest
restart: always
stdin_open: true
tty: true
ports:
- 80:80
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:ro
networks:
- reverse-proxy

networks:
reverse-proxy:
external: true
34 changes: 34 additions & 0 deletions tasks/dockerservice/home/hayato/compose/reverseproxy/nginx.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@

user nginx;
worker_processes auto;

error_log /var/log/nginx/error.log notice;
pid /var/run/nginx.pid;


events {
worker_connections 1024;
}

http {
include /etc/nginx/mime.types;
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;
keepalive_timeout 65;

server {
server_name jenkins-deb.hayaworld.home;
proxy_set_header Host $host;
listen 80;
location / {
proxy_pass http://jenkins-deb-container/;
}
}
}

0 comments on commit af8fab1

Please sign in to comment.