init
This commit is contained in:
commit
6f01318bba
3 changed files with 53 additions and 0 deletions
3
README.md
Normal file
3
README.md
Normal file
|
@ -0,0 +1,3 @@
|
|||
# forgejo formula
|
||||
|
||||
Salt formula for deploying fogejo using docker.
|
33
forgejo/init.sls
Normal file
33
forgejo/init.sls
Normal file
|
@ -0,0 +1,33 @@
|
|||
forgejo data directory exists:
|
||||
file.directory:
|
||||
- name: /opt/forgejo/data
|
||||
- makedirs: True
|
||||
|
||||
forgejo docker conatiner running:
|
||||
docker_container.running:
|
||||
- name: forgejo
|
||||
- image: {{ salt['pillar.get']('forgejo:image:path', 'codeberg.org/forgejo/forgejo') }}:{{ salt['pillar.get']('forgejo:image:version', '1.19') }}
|
||||
- container_name: forgejo
|
||||
- environment:
|
||||
- USER_UID=1000
|
||||
- USER_GID=1000
|
||||
- FORGEJO__default__APP_NAME={{ salt['pillar.get']('forgejo:config:default:app_name', 'forgejo') }}
|
||||
- FORGEJO__ui__SHOW_USER_EMAIL={{ salt['pillar.get']('forgejo:config:ui:show_user_email', 'false') }}
|
||||
- FORGEJO__server__ROOT_URL={{ salt['pillar.get']('forgejo:config:server:root_url', 'http://localhost')}}
|
||||
- FORGEJO__server__DOMAIN={{ salt['pillar.get']('forgejo:config:server:domain', 'localhost')}}
|
||||
- FORGEJO__server__SSH_PORT={{ salt['pillar.get']('forgejo:config:server:ssh_port', 22)}}
|
||||
- FORGEJO__server__SSH_DOMAIN={{ salt['pillar.get']('forgejo:config:server:ssh_domain', 'localhost')}}
|
||||
- FORGEJO__server__START_SSH_SERVER={{ salt['pillar.get']('forgejo:config:server:start_ssh_server', "false")}}
|
||||
- FORGEJO__service__DISABLE_REGISTRATION={{ salt['pillar.get']('forgejo:config:service:disable_registration', "true")}}
|
||||
- restart: always
|
||||
- networks:
|
||||
- bridge
|
||||
- extra_hosts:
|
||||
- ldap.flipdot.space:192.168.3.233
|
||||
- binds:
|
||||
- /opt/forgejo/data:/data
|
||||
- /etc/timezone:/etc/timezone:ro
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
- port_bindings:
|
||||
- "127.0.0.1:3000:3000"
|
||||
- "222:22"
|
17
pillar.example
Normal file
17
pillar.example
Normal file
|
@ -0,0 +1,17 @@
|
|||
forgejo:
|
||||
image:
|
||||
path: codeberg.org/forgejo/forgejo
|
||||
version: 7.0.5
|
||||
|
||||
config:
|
||||
default:
|
||||
app_name: my awesome code forge
|
||||
ui:
|
||||
show_user_email: "false"
|
||||
server:
|
||||
domain: git.example.com
|
||||
root_url: https://git.example.com/
|
||||
ssh_port: 22
|
||||
ssh_domain: git.example.com
|
||||
service:
|
||||
disable_registration=true
|
Loading…
Reference in a new issue