Skip to content

Instantly share code, notes, and snippets.

@chinaphp
Forked from typebrook/.env.template
Created February 19, 2023 05:27
Show Gist options
  • Select an option

  • Save chinaphp/d7841a53e95ccfcb3a3e031dfb8112d1 to your computer and use it in GitHub Desktop.

Select an option

Save chinaphp/d7841a53e95ccfcb3a3e031dfb8112d1 to your computer and use it in GitHub Desktop.
Docker Compose for nginx and gitea
version: "3.7"
services:
nginx:
image: nginx:alpine
container_name: nginx
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:ro
- /wk171/pham/doc:/doc
ports:
- 80:80
gitea:
image: gitea/gitea:latest
container_name: gitea
volumes:
- /wk171/pham/gitea:/data
networks:
default:
name: gitea
worker_processes 1;
events { worker_connections 1024; }
http {
sendfile on;
upstream gitea {
server gitea:3000;
}
server {
listen 80;
server_name localhost station.topo.tw;
charset utf-8;
client_max_body_size 200m;
location /gitea/ {
proxy_pass http://gitea/;
proxy_redirect off;
proxy_set_header Host $host:$server_port;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
location /doc/docker/ {
alias /doc/docker/;
}
location /doc/git {
alias /doc/git/;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment