问题
解决:
- docker-compose.yml:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
|
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 |