docker 部署 gitea

docker-compose.yml
version: "3.7"

services:

  web:
    image: gitea/gitea:latest
    restart: always
    ports:
      - "3000:3000"
      - "8022:22"
    volumes:
      - git_data:/data
    environment:
      - TZ=Asia/Shanghai
      - GITEA__database__DB_TYPE=postgres
      - GITEA__database__HOST=db:5432
      - GITEA__database__NAME=gitea
      - GITEA__database__USER=gitea
      - GITEA__database__PASSWD=gitea
    depends_on:
      - db

  db:
    image: postgres:alpine
    restart: always
    volumes:
      - db_data:/var/lib/postgresql/data
    # ports:
    #  - "5432:5432"
    environment:
      # default user name: postgres
      - POSTGRES_USER=gitea
      - POSTGRES_PASSWORD=gitea
      - POSTGRES_DB=gitea
      - TZ=Asia/Shanghai

  adminer:
    image: adminer
    restart: always
    ports:
      - "8023:8080"

volumes:
  git_data:
  db_data: