Commit b9a48381 authored by Dave Newton's avatar Dave Newton 🍺
Browse files

docker files

parent 62aa25f5
version: "3"
services:
gb0:
build:
context: .
dockerfile: gb0.Dockerfile
ports:
- "16667:16667"
gb2c:
build:
context: .
dockerfile: gb2c.Dockerfile
environment:
- "GB2C_GB0_TRIBUNES=taiste:http://gb0:16667"
ports:
- "16666:16666"
reverse-proxy:
image: nginx
volumes:
- ./nginx.conf:/etc/nginx/conf.d/default.conf
- ./gc2:/srv/gc2
ports:
- "8080:80"
FROM golang:1.16 AS gb0_builder
WORKDIR /go/src/github.com/devnewton/gb3
COPY . .
RUN go build ./cmd/gb0
FROM debian:stable as gb0
WORKDIR /root/
RUN apt update && apt install -y --no-install-recommends ca-certificates
RUN update-ca-certificates
COPY --from=gb0_builder /go/src/github.com/devnewton/gb3/gb0 ./
EXPOSE 16667
CMD ["./gb0"]
\ No newline at end of file
FROM golang:1.16 AS gb2c_builder
WORKDIR /go/src/github.com/devnewton/gb3
COPY . .
RUN go build ./cmd/gb2c
FROM debian:stable as gb2c
WORKDIR /root/
RUN apt update && apt install -y --no-install-recommends ca-certificates
RUN update-ca-certificates
COPY --from=gb2c_builder /go/src/github.com/devnewton/gb3/gb2c ./
EXPOSE 16666
CMD ["./gb2c"]
\ No newline at end of file
server {
listen 80;
listen [::]:80;
location / {
root /srv/gc2;
index index.html;
try_files $uri $uri/ =404;
}
location /gb2c {
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Proto https;
proxy_pass http://gb2c:16666;
}
location /gb2c/poll {
proxy_buffering off;
proxy_cache off;
proxy_set_header Connection '';
chunked_transfer_encoding off;
proxy_http_version 1.1;
proxy_read_timeout 1h;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Proto https;
proxy_pass http://gb2c:16666;
}
location /gb0 {
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Proto https;
proxy_pass http://gb0:16667;
}
location = /robots.txt {
add_header Content-Type text/plain;
return 200 "User-agent: *\nDisallow: /\n";
}
client_max_body_size 1m;
client_body_timeout 120s;
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment