Добавил Gitea для хранения кода
This commit is contained in:
3
app/gitea/.env
Normal file
3
app/gitea/.env
Normal file
@ -0,0 +1,3 @@
|
||||
WEB_SERVER_PORT=9494
|
||||
USER_UID=1000
|
||||
USER_GID=1000
|
1
app/gitea/.gitignore
vendored
Normal file
1
app/gitea/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
data/
|
16
app/gitea/docker-compose.yml
Normal file
16
app/gitea/docker-compose.yml
Normal file
@ -0,0 +1,16 @@
|
||||
version: "3"
|
||||
|
||||
services:
|
||||
|
||||
server:
|
||||
image: gitea/gitea:1.19.3
|
||||
environment:
|
||||
- "USER_UID=${USER_UID}"
|
||||
- "USER_GID=${USER_GID}"
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- ./data:/data
|
||||
- /etc/timezone:/etc/timezone:ro
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
ports:
|
||||
- "${WEB_SERVER_PORT}:3000"
|
20
app/gitea/tasks.py
Normal file
20
app/gitea/tasks.py
Normal file
@ -0,0 +1,20 @@
|
||||
from fabric import Connection
|
||||
from invoke import task
|
||||
import shlex
|
||||
|
||||
APP_NAME = "gitea"
|
||||
SSH_HOST = f"{APP_NAME}@51.250.85.23"
|
||||
DOCKER_REGISTRY = "cr.yandex/crplfk0168i4o8kd7ade"
|
||||
|
||||
|
||||
@task
|
||||
def deploy(c):
|
||||
print("Ready to setup remote host")
|
||||
with Connection(SSH_HOST) as c:
|
||||
c.put(
|
||||
local="docker-compose.yml",
|
||||
remote=f"/home/{APP_NAME}/docker-compose.yml",
|
||||
)
|
||||
c.run("cp .env .env.prod")
|
||||
c.run("mkdir -p data")
|
||||
c.run(f"docker-compose --project-name {shlex.quote(APP_NAME)} --env-file=.env.prod up --detach --remove-orphans")
|
Reference in New Issue
Block a user