Add initial setup
This commit is contained in:
parent
295059806d
commit
84bfc0d0fc
3 changed files with 131 additions and 0 deletions
49
templates/docker-compose.j2
Normal file
49
templates/docker-compose.j2
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
# {{ ansible_managed }}
|
||||
|
||||
services:
|
||||
woodpecker-server:
|
||||
image: {{ image_tag }}
|
||||
ports:
|
||||
- 7000:8000
|
||||
volumes:
|
||||
- woodpecker-server-data:/var/lib/woodpecker/
|
||||
depends_on:
|
||||
- db
|
||||
environment:
|
||||
WOODPECKER_OPEN: true
|
||||
WOODPECKER_HOST: 'https://{{ domain }}'
|
||||
WOODPECKER_AGENT_SECRET: {{ woodpecker_agent_secret }}
|
||||
WOODPECKER_DATABASE_DRIVER: postgres
|
||||
WOODPECKER_DATABASE_DATASOURCE: postgres://{{ postgres_user }}:{{ postgres_password }}@db:5432/postgres?sslmode=disable
|
||||
WOODPECKER_FORGEJO: true
|
||||
WOODPECKER_FORGEJO_URL: {{ woodpecker_forgejo_url }}
|
||||
WOODPECKER_FORGEJO_CLIENT: {{ woodpecker_forgejo_client }}
|
||||
WOODPECKER_FORGEJO_SECRET: {{ woodpecker_forgejo_secret }}
|
||||
|
||||
db:
|
||||
image: postgres:17
|
||||
restart: always
|
||||
environment:
|
||||
POSTGRES_USER: {{ postgres_user }}
|
||||
POSTGRES_PASSWORD: {{ postgres_password }}
|
||||
POSTGRES_DB: {{ postgres_name }}
|
||||
volumes:
|
||||
- postgres-data:/var/lib/postgresql/data
|
||||
|
||||
woodpecker-agent:
|
||||
image: {{ agent_tag }}
|
||||
command: agent
|
||||
restart: always
|
||||
depends_on:
|
||||
- woodpecker-server
|
||||
volumes:
|
||||
- woodpecker-agent-config:/etc/woodpecker
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
environment:
|
||||
WOODPECKER_SERVER: woodpecker-server:9000
|
||||
WOODPECKER_AGENT_SECRET: {{ woodpecker_agent_secret }}
|
||||
|
||||
volumes:
|
||||
woodpecker-server-data:
|
||||
woodpecker-agent-config:
|
||||
postgres-data:
|
||||
Reference in a new issue