root Apostolos
5 years ago
2 changed files with 52 additions and 0 deletions
@ -0,0 +1,51 @@ |
|||
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} |
|||
|
@ -0,0 +1 @@ |
|||
env REGISTERid=c50xzv12mz3cux1mcdz4ypznc docker stack deploy -c git.yaml git |
Loading…
Reference in new issue