2023-02-12 20:59:55 +00:00
|
|
|
{{- 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 -}}
|
2022-11-18 15:08:16 +00:00
|
|
|
---
|
2022-11-18 19:05:58 +00:00
|
|
|
version: "3.9"
|
2022-11-18 15:08:16 +00:00
|
|
|
|
|
|
|
networks:
|
2022-11-18 19:05:58 +00:00
|
|
|
flow:
|
|
|
|
name: "flow"
|
2022-11-18 15:08:16 +00:00
|
|
|
ipam:
|
|
|
|
driver: "default"
|
|
|
|
config:
|
2023-02-12 20:59:55 +00:00
|
|
|
- subnet: "{{ .DockerNetworkSubnet }}"
|
2022-11-18 15:08:16 +00:00
|
|
|
|
|
|
|
volumes:
|
|
|
|
traefik-shared:
|
|
|
|
name: "traefik-config-shared-volume"
|
|
|
|
|
|
|
|
services:
|
|
|
|
# -- Traffic flow --
|
|
|
|
traefik:
|
|
|
|
container_name: "traffic-flow"
|
2023-02-12 20:59:55 +00:00
|
|
|
image: "localhost/flow/traefik:{{ .Traefik.Version }}"
|
2022-11-18 15:08:16 +00:00
|
|
|
build:
|
2022-11-18 19:05:58 +00:00
|
|
|
context: "../traefik"
|
2022-11-18 15:08:16 +00:00
|
|
|
networks:
|
2022-11-18 19:05:58 +00:00
|
|
|
flow:
|
2023-02-12 20:59:55 +00:00
|
|
|
ipv4_address: "{{ .Traefik.ContainerIpv4Address }}"
|
2022-11-18 15:08:16 +00:00
|
|
|
ports:
|
|
|
|
- target: 80
|
|
|
|
published: 80
|
|
|
|
protocol: "tcp"
|
|
|
|
mode: "host"
|
|
|
|
- target: 443
|
|
|
|
published: 443
|
|
|
|
protocol: "tcp"
|
|
|
|
mode: "host"
|
2023-02-12 20:59:55 +00:00
|
|
|
- target: {{ .Traefik.ExternalSSHPort }}
|
|
|
|
published: {{ .Traefik.ExternalSSHPort }}
|
2022-11-18 15:08:16 +00:00
|
|
|
protocol: "tcp"
|
|
|
|
mode: "host"
|
|
|
|
restart: "always"
|
|
|
|
volumes:
|
2023-02-12 20:59:55 +00:00
|
|
|
{{- template "defaultVolumes" }}
|
|
|
|
# Shared volume
|
2022-11-18 15:08:16 +00:00
|
|
|
- type: "volume"
|
|
|
|
source: "traefik-shared"
|
2023-02-12 20:59:55 +00:00
|
|
|
target: "{{ .Traefik.SharedMountPoint }}"
|
2022-11-18 15:08:16 +00:00
|
|
|
# Traefik TLS volume
|
|
|
|
- type: "bind"
|
2023-02-12 20:59:55 +00:00
|
|
|
source: "{{ .Traefik.TlsHostDirectory }}"
|
|
|
|
target: "{{ .Traefik.TlsContainerDirectory }}"
|
2022-11-18 15:08:16 +00:00
|
|
|
# -- Code flow --
|
2023-02-09 03:06:36 +00:00
|
|
|
forgejo:
|
2022-11-18 15:08:16 +00:00
|
|
|
container_name: "code-flow"
|
2023-02-12 20:59:55 +00:00
|
|
|
image: "localhost/flow/forgejo:{{ .Forgejo.Version }}"
|
2022-11-18 15:08:16 +00:00
|
|
|
build:
|
2023-02-09 03:06:36 +00:00
|
|
|
context: "../forgejo"
|
2022-11-18 15:08:16 +00:00
|
|
|
expose:
|
2023-02-12 20:59:55 +00:00
|
|
|
- "{{ .Forgejo.SshPort }}"
|
|
|
|
- "{{ .Forgejo.HttpPort }}"
|
2022-11-18 15:08:16 +00:00
|
|
|
networks:
|
2022-11-18 19:05:58 +00:00
|
|
|
flow:
|
2023-02-12 20:59:55 +00:00
|
|
|
ipv4_address: "{{ .Forgejo.ContainerIpv4Address }}"
|
2022-11-18 15:08:16 +00:00
|
|
|
restart: "always"
|
|
|
|
volumes:
|
2023-02-12 20:59:55 +00:00
|
|
|
{{- template "defaultVolumes" }}
|
|
|
|
# Shared volume
|
2022-11-18 15:08:16 +00:00
|
|
|
- type: "volume"
|
|
|
|
source: "traefik-shared"
|
2023-02-12 20:59:55 +00:00
|
|
|
target: "{{ .Traefik.SharedMountPoint }}"
|
|
|
|
# Forgejo data volume
|
2022-11-18 15:08:16 +00:00
|
|
|
- type: "bind"
|
2023-02-12 20:59:55 +00:00
|
|
|
source: "{{ .Forgejo.DataHostDirectory }}"
|
|
|
|
target: "{{ .Forgejo.DataContainerDirectory }}"
|
2022-11-21 05:49:41 +00:00
|
|
|
# -- Free Flow 2 --
|
|
|
|
gotosocial:
|
2023-02-09 03:06:36 +00:00
|
|
|
container_name: "free-flow"
|
2023-02-12 20:59:55 +00:00
|
|
|
image: "localhost/flow/gotosocial:{{ .GoToSocial.Version }}"
|
2022-11-21 05:49:41 +00:00
|
|
|
build:
|
|
|
|
context: "../gotosocial"
|
|
|
|
expose:
|
2023-02-12 20:59:55 +00:00
|
|
|
- "{{ .GoToSocial.Port }}"
|
2022-11-21 05:49:41 +00:00
|
|
|
networks:
|
|
|
|
flow:
|
2023-02-12 20:59:55 +00:00
|
|
|
ipv4_address: "{{ .GoToSocial.ContainerIpv4Address }}"
|
2022-11-21 05:49:41 +00:00
|
|
|
restart: "always"
|
|
|
|
volumes:
|
2023-02-12 20:59:55 +00:00
|
|
|
{{- template "defaultVolumes" }}
|
|
|
|
# Shared volume
|
2022-11-21 05:49:41 +00:00
|
|
|
- type: "volume"
|
|
|
|
source: "traefik-shared"
|
2023-02-12 20:59:55 +00:00
|
|
|
target: "{{ .Traefik.SharedMountPoint }}"
|
2022-11-21 05:49:41 +00:00
|
|
|
# Go To Social data volume
|
|
|
|
- type: "bind"
|
2023-02-12 20:59:55 +00:00
|
|
|
source: "{{ .GoToSocial.DataHostDirectory }}"
|
|
|
|
target: "{{ .GoToSocial.DataContainerDirectory }}"
|