Skip to content

Commit

Permalink
Add nginx for artifacts
Browse files Browse the repository at this point in the history
  • Loading branch information
fauust committed Aug 11, 2023
1 parent a940034 commit b68d617
Show file tree
Hide file tree
Showing 4 changed files with 71 additions and 0 deletions.
13 changes: 13 additions & 0 deletions docker-compose/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,19 @@ services:
networks:
net_back:

nginx:
image: nginx:latest
restart: unless-stopped
container_name: nginx
volumes:
- ./nginx/nginx.conf:/etc/nginx/nginx.conf:ro
- ./nginx/conf.d/:/etc/nginx/conf.d/:ro
- /srv/buildbot/packages:/srv/buildbot/packages:ro
ports:
- "127.0.0.1:8080:80"
networks:
net_front:

master-web:
image: quay.io/mariadb-foundation/bb-master:master-web
restart: unless-stopped
Expand Down
13 changes: 13 additions & 0 deletions docker-compose/generate-config.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,19 @@
networks:
net_back:
nginx:
image: nginx:latest
restart: unless-stopped
container_name: nginx
volumes:
- ./nginx/nginx.conf:/etc/nginx/nginx.conf:ro
- ./nginx/conf.d/:/etc/nginx/conf.d/:ro
- /srv/buildbot/packages:/srv/buildbot/packages:ro
ports:
- "127.0.0.1:8080:80"
networks:
net_front:
master-web:
image: quay.io/mariadb-foundation/bb-master:master-web
restart: unless-stopped
Expand Down
15 changes: 15 additions & 0 deletions docker-compose/nginx/conf.d/ci.dev.mariadb.org.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
server {
listen 80;
server_name ci.dev.mariadb.org;

root /srv/buildbot/packages/;
autoindex on;

# show mysql error logs directly in browser
# example https://ci.mariadb.org/16646/logs/aarch64-ubuntu-2010/mysqld.2.err.4
# see https://jira.mariadb.org/browse/MDBF-250
# location ~ \.err\.\d+$ {
location ~ mysqld\.[0-9]+\.err\.[0-9]+$ {
add_header Content-Type text/plain;
}
}
30 changes: 30 additions & 0 deletions docker-compose/nginx/nginx.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
user nginx;
worker_processes auto;

error_log /var/log/nginx/error.log warn;
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;
tcp_nopush on;
server_tokens off;

keepalive_timeout 65;

gzip on;

include /etc/nginx/conf.d/*.conf;
}

0 comments on commit b68d617

Please sign in to comment.