git.swarmlab
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

52 lines
917 B

5 years ago
version: "3.3"
networks:
gitea:
external: false
services:
server:
image: gitea/gitea:1.9
environment:
- USER_UID=1002
- USER_GID=1002
- DB_TYPE=mysql
- DB_HOST=db:3306
- DB_NAME=gitea
- DB_USER=gitea
- DB_PASSWD=gitea
restart: always
networks:
- gitea
volumes:
- /var/lib/gitea:/data
ports:
- "3000:3000"
- "3080:3080"
- "127.0.0.1:2222:22"
depends_on:
- db
deploy:
placement:
constraints:
- node.id == ${REGISTERid}
db:
image: mysql:5.7
restart: always
environment:
- MYSQL_ROOT_PASSWORD=gitea
- MYSQL_USER=gitea
- MYSQL_PASSWORD=gitea
- MYSQL_DATABASE=gitea
networks:
- gitea
volumes:
- /var/lab/gitea/mysql:/var/lib/mysql
deploy:
placement:
constraints:
- node.id == ${REGISTERid}