2020年6月20日 | Leave a comment 问题 解决: docker-compose.yml: docker-compose.yml version: '3' services: gitea_web: image: gitea/gitea:1.8.3 volumes: - ./gitea_data:/data ports: - "3000:3000" - "10080:10080" - "10022:22" depends_on: - gitea_db restart: on-failure gitea_db: image: mariadb:10 restart: on-failure environment: - MYSQL_ROOT_PASSWORD=abcd1234 - MYSQL_DATABASE=gitea - MYSQL_USER=gitea - MYSQL_PASSWORD=abcd1234 volumes: - ./gitea_mysql:/var/lib/mysql 1234567891011121314151617181920212223 version: '3'services: gitea_web: image: gitea/gitea:1.8.3 volumes: - ./gitea_data:/data ports: - "3000:3000" - "10080:10080" - "10022:22" depends_on: - gitea_db restart: on-failure gitea_db: image: mariadb:10 restart: on-failure environment: - MYSQL_ROOT_PASSWORD=abcd1234 - MYSQL_DATABASE=gitea - MYSQL_USER=gitea - MYSQL_PASSWORD=abcd1234 volumes: - ./gitea_mysql:/var/lib/mysql 2. 然后执行 docker stack deploy -c ./docker-compose.yml gitea 1 docker stack deploy -c ./docker-compose.yml gitea