Initial commit
This commit is contained in:
commit
2a21752463
3 changed files with 111 additions and 0 deletions
42
templates/docker-compose.j2
Normal file
42
templates/docker-compose.j2
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
# {{ ansible_managed }}
|
||||
|
||||
networks:
|
||||
forgejo:
|
||||
external: false
|
||||
|
||||
services:
|
||||
server:
|
||||
image: '{{ image_tag }}'
|
||||
container_name: forgejo
|
||||
environment:
|
||||
- USER_UID=1000
|
||||
- USER_GID=1000
|
||||
- FORGEJO__database__DB_TYPE=postgres
|
||||
- FORGEJO__database__HOST=db:5432
|
||||
- FORGEJO__database__NAME={{ postgres_name }}
|
||||
- FORGEJO__database__USER={{ postgres_user }}
|
||||
- FORGEJO__database__PASSWD={{ postgres_password }}
|
||||
restart: always
|
||||
networks:
|
||||
- forgejo
|
||||
volumes:
|
||||
- {{ data_dir }}:/data
|
||||
- /etc/timezone:/etc/timezone:ro
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
ports:
|
||||
- '3000:3000'
|
||||
- '22:22'
|
||||
depends_on:
|
||||
- db
|
||||
|
||||
db:
|
||||
image: postgres:14
|
||||
restart: always
|
||||
environment:
|
||||
- POSTGRES_USER={{ postgres_user }}
|
||||
- POSTGRES_PASSWORD={{ postgres_password }}
|
||||
- POSTGRES_DB={{ postgres_name }}
|
||||
networks:
|
||||
- forgejo
|
||||
volumes:
|
||||
- {{ postgres_dir }}:/var/lib/postgresql/data
|
||||
Reference in a new issue