💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、星火、月之暗面及文生图 广告
**nginx使用host网络** ``` version: "3" services: nginx: image: nginx:stable network_mode: "host" restart: unless-stopped volumes: - "./nginx.conf:/etc/nginx/nginx.conf" - "./conf.d:/etc/nginx/conf.d" - "./certs:/etc/nginx/certs" - "./log:/var/log/nginx" logging: driver: "json-file" options: max-size: "10m" max-file: "3" ``` **gitea** ``` version: "3" services: mysql: build: context: ./mysql environment: MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD:?err} MYSQL_USER: ${GITEA_DB_USER:?err} MYSQL_PASSWORD: ${GITEA_DB_PASSWD:?err} MYSQL_DATABASE: ${GITEA_DB_NAME:?err} volumes: - ./mysql-data:/var/lib/mysql networks: - gitea restart: unless-stopped security_opt: - seccomp:unconfined logging: driver: "json-file" options: max-size: "10m" max-file: "3" gitea: image: gitea/gitea:1 depends_on: - mysql environment: DB_TYPE: ${GITEA_DB_TYPE:?err} DB_HOST: ${GITEA_DB_HOST:?err} DB_NAME: ${GITEA_DB_NAME:?err} DB_USER: ${GITEA_DB_USER:?err} DB_PASSWD: ${GITEA_DB_PASSWD:?err} volumes: - ./gitea-data:/data ports: - "22:22" - "127.0.0.1:3000:3000" networks: - gitea restart: unless-stopped logging: driver: "json-file" options: max-size: "10m" max-file: "3" networks: gitea: driver: bridge ``` **反向代理** ``` server { listen 443 ssl http2; server_name git.zorzz.com; ssl_certificate /etc/nginx/certs/git.zorzz.com.pem; ssl_certificate_key /etc/nginx/certs/git.zorzz.com.key; ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4; ssl_protocols TLSv1 TLSv1.1 TLSv1.2; ssl_prefer_server_ciphers on; ssl_session_cache shared:SSL:10m; ssl_session_timeout 5m; location / { proxy_set_header X-Real-IP $remote_addr; proxy_set_header Host $host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_pass http://127.0.0.1:3000; } } ```