Add reverse proxy

This commit is contained in:
Khue Doan 2020-06-23 14:22:26 +07:00
parent 4cbf7fd89f
commit 88e45e97d9
3 changed files with 22 additions and 5 deletions

View File

@ -7,17 +7,13 @@ services:
ports:
- "80:80"
- "443:443"
- "22:22"
index:
container_name: "khuedoan_index"
build: ./index/
ports:
- "8000:8000"
gitea:
container_name: "khuedoan_gitea"
build: ./gitea/
ports:
- "3000:3000"
- "22:22"
mariadb:
container_name: "khuedoan_mariadb"
build: ./mariadb/

View File

@ -1 +1,3 @@
FROM nginx:1.19.0-alpine
COPY ./default.conf /etc/nginx/conf.d/default.conf

19
nginx/default.conf Normal file
View File

@ -0,0 +1,19 @@
server {
listen 80;
listen [::]:80;
server_name localhost;
location / {
proxy_pass http://index:8000;
}
}
server {
listen 80;
listen [::]:80;
server_name git.localhost;
location / {
proxy_pass http://gitea:3000;
}
}