init: First deployed Forgejo instance
This commit is contained in:
commit
fd31aeb93b
3 changed files with 47 additions and 0 deletions
20
compose.yml
Normal file
20
compose.yml
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
networks:
|
||||
forgejo:
|
||||
external: false
|
||||
services:
|
||||
forgejo:
|
||||
image: codeberg.org/forgejo/forgejo:10
|
||||
container_name: forgejo
|
||||
environment:
|
||||
- USER_UID=1000
|
||||
- USER_GID=1000
|
||||
restart: always
|
||||
networks:
|
||||
- forgejo
|
||||
volumes:
|
||||
- ./forgejo:/data
|
||||
- /etc/timezone:/etc/timezone:ro
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
ports:
|
||||
- '3000:3000'
|
||||
- '222:22'
|
||||
13
deploy.sh
Executable file
13
deploy.sh
Executable file
|
|
@ -0,0 +1,13 @@
|
|||
SRC="$PWD"
|
||||
SRV="/srv/forgejo.campbell.kiwi"
|
||||
|
||||
TRAEFIK_CONFIG="/etc/traefik/conf/forego.yml"
|
||||
|
||||
echo "Deploying files in $SRC to $SRV"
|
||||
sudo cp -r $SRC/* $SRV
|
||||
|
||||
echo "Deploying files in $SRC/traefik/traefik.yml to $TRAEFIK_CONFIG"
|
||||
sudo cp $SRC/traefik/traefik.yml $TRAEFIK_CONFIG
|
||||
|
||||
echo "Running $SRV/compose.yml"
|
||||
docker compose --file $SRV/compose.yml up -d --no-deps --build
|
||||
14
traefik/traefik.yml
Normal file
14
traefik/traefik.yml
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
http:
|
||||
routers:
|
||||
forgejo_default:
|
||||
rule: "Host(`forgejo.campbell.kiwi`)"
|
||||
entrypoints:
|
||||
- "websecure"
|
||||
service: "forgejo"
|
||||
tls:
|
||||
certresolver: "myresolver"
|
||||
services:
|
||||
forgejo:
|
||||
loadBalancer:
|
||||
servers:
|
||||
- url: "http://localhost:3000"
|
||||
Loading…
Add table
Reference in a new issue