services/templates/compose/docker-compose.yaml.gotmpl
Dan Anglin c7b5859ae6
chore: upgrade GTS to v0.11.0 and update config
- Upgrade GoToSocial to v0.11.0
- Template the base web directory
- Template the container's timezone
- Update the configuration template
2023-08-15 18:51:39 +01:00

145 lines
4.3 KiB
Go Template

{{- define "defaultVolumes" }}
- type: "bind"
source: "/etc/timezone"
target: "/etc/timezone"
read_only: true
- type: "bind"
source: "/etc/localtime"
target: "/etc/localtime"
read_only: true
{{- end -}}
---
version: "3.9"
networks:
flow:
name: "flow"
ipam:
driver: "default"
config:
- subnet: "{{ .DockerNetworkSubnet }}"
volumes:
traefik-shared:
name: "traefik-config-shared-volume"
services:
# -- Traffic flow --
traefik:
container_name: "traffic-flow"
image: "localhost/flow/traefik:{{ .Traefik.Version }}"
build:
context: "../traefik"
networks:
flow:
ipv4_address: "{{ .Traefik.ContainerIpv4Address }}"
ports:
- target: 80
published: 80
protocol: "tcp"
mode: "host"
- target: 443
published: 443
protocol: "tcp"
mode: "host"
- target: {{ .Traefik.ExternalSSHPort }}
published: {{ .Traefik.ExternalSSHPort }}
protocol: "tcp"
mode: "host"
restart: "always"
volumes:
{{- template "defaultVolumes" }}
# Shared volume
- type: "volume"
source: "traefik-shared"
target: "{{ .Traefik.SharedMountPoint }}"
# Traefik TLS volume
- type: "bind"
source: "{{ .Traefik.TlsHostDirectory }}"
target: "{{ .Traefik.TlsContainerDirectory }}"
# -- Code flow --
forgejo:
container_name: "code-flow"
image: "localhost/flow/forgejo:{{ .Forgejo.Version }}"
build:
context: "../forgejo"
expose:
- "{{ .Forgejo.SshPort }}"
- "{{ .Forgejo.HttpPort }}"
networks:
flow:
ipv4_address: "{{ .Forgejo.ContainerIpv4Address }}"
restart: "always"
volumes:
{{- template "defaultVolumes" }}
# Shared volume
- type: "volume"
source: "traefik-shared"
target: "{{ .Traefik.SharedMountPoint }}"
# Forgejo data volume
- type: "bind"
source: "{{ .Forgejo.DataHostDirectory }}"
target: "{{ .Forgejo.DataContainerDirectory }}"
# -- Free Flow --
gotosocial:
container_name: "free-flow"
image: "localhost/flow/gotosocial:{{ .GoToSocial.Version }}"
build:
context: "../gotosocial"
environment:
TZ: {{ .GoToSocial.TZ }}
expose:
- "{{ .GoToSocial.Port }}"
networks:
flow:
ipv4_address: "{{ .GoToSocial.ContainerIpv4Address }}"
restart: "always"
volumes:
{{- template "defaultVolumes" }}
# Shared volume
- type: "volume"
source: "traefik-shared"
target: "{{ .Traefik.SharedMountPoint }}"
# Go To Social data volume
- type: "bind"
source: "{{ .GoToSocial.DataHostDirectory }}"
target: "{{ .GoToSocial.DataContainerDirectory }}"
# -- Work Flow --
woodpecker:
container_name: "work-flow"
image: "localhost/flow/woodpecker:{{ .Woodpecker.Version }}"
build:
context: "../woodpecker"
environment:
WOODPECKER_LOG_LEVEL: "{{ .Woodpecker.LogLevel }}"
WOODPECKER_HOST: "https://{{ .Woodpecker.Subdomain }}.{{ .RootDomain }}"
WOODPECKER_SERVER_ADDR: "{{ .Woodpecker.ContainerIpv4Address }}:{{ .Woodpecker.HttpPort }}"
WOODPECKER_GRPC_ADDR: "{{ .Woodpecker.ContainerIpv4Address }}:{{ .Woodpecker.GrpcPort }}"
WOODPECKER_LETS_ENCRYPT: "false"
WOODPECKER_ADMIN: "{{ .Woodpecker.Admin }}"
WOODPECKER_OPEN: "{{ .Woodpecker.Open }}"
WOODPECKER_AGENT_SECRET: "{{ .Woodpecker.AgentSecret }}"
WOODPECKER_DATABASE_DRIVER: "sqlite3"
WOODPECKER_DATABASE_DATASOURCE: "{{ .Woodpecker.DataContainerDirectory }}/woodpecker.db"
WOODPECKER_GITEA: "true"
WOODPECKER_GITEA_URL: "https://{{ .Forgejo.Subdomain }}.{{ .RootDomain }}"
WOODPECKER_GITEA_CLIENT: "{{ .Woodpecker.ForgejoClientID }}"
WOODPECKER_GITEA_SECRET: "{{ .Woodpecker.ForgejoClientSecret }}"
WOODPECKER_GITEA_SKIP_VERIFY: "false"
expose:
- "{{ .Woodpecker.HttpPort }}"
- "{{ .Woodpecker.GrpcPort }}"
networks:
flow:
ipv4_address: "{{ .Woodpecker.ContainerIpv4Address }}"
restart: "always"
volumes:
{{- template "defaultVolumes" }}
# Shared volume
- type: "volume"
source: "traefik-shared"
target: "{{ .Traefik.SharedMountPoint }}"
# Woodpecker data volume
- type: "bind"
source: "{{ .Woodpecker.DataHostDirectory }}"
target: "{{ .Woodpecker.DataContainerDirectory }}"