diff --git a/docker-compose.yml b/docker-compose.yml index b9f810b3..3068664e 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -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/ diff --git a/nginx/Dockerfile b/nginx/Dockerfile index 0334310c..1339474c 100644 --- a/nginx/Dockerfile +++ b/nginx/Dockerfile @@ -1 +1,3 @@ FROM nginx:1.19.0-alpine + +COPY ./default.conf /etc/nginx/conf.d/default.conf diff --git a/nginx/default.conf b/nginx/default.conf new file mode 100644 index 00000000..5f5d6330 --- /dev/null +++ b/nginx/default.conf @@ -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; + } +}