diff --git a/docker-compose.yml b/docker-compose.yml index b4d66491..3c796577 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -31,3 +31,6 @@ services: environment: MYSQL_ROOT_PASSWORD: $MYSQL_ROOT_PASSWORD MYSQL_DATABASE: "gitea" + pastebin: + container_name: "khuedoan_pastebin" + build: ./pastebin/ diff --git a/nginx/default.conf b/nginx/default.conf index f36e4d18..80d69c97 100644 --- a/nginx/default.conf +++ b/nginx/default.conf @@ -17,3 +17,13 @@ server { proxy_pass http://gitea:3000; } } + +server { + listen 80; + listen [::]:80; + server_name pastebin.khuedoan.com; + + location / { + proxy_pass http://pastebin:8000; + } +} diff --git a/pastebin/Dockerfile b/pastebin/Dockerfile new file mode 100644 index 00000000..4cf04c87 --- /dev/null +++ b/pastebin/Dockerfile @@ -0,0 +1,7 @@ +FROM alpine:3.12.0 + +ADD https://github.com/w4/bin/releases/download/v1.0.3/bin-v1.0.3-x86_64-unknown-linux-musl.tar.gz /tmp/ + +RUN tar -xvzf /tmp/bin-*.tar.gz -C /usr/local/bin/ && rm /tmp/bin-*.tar.gz + +CMD [ "bin" ]