Compare commits
4 Commits
ce58685691
...
39920fd1e6
| Author | SHA1 | Date | |
|---|---|---|---|
| 39920fd1e6 | |||
| 2718e42ff8 | |||
| 27cd521a0f | |||
| 60dcae71ef |
@ -12,7 +12,7 @@ Kubernetes has simply too much overhead for a small home lab like mine. I'm usin
|
|||||||
The only thing that would make me change idea would be a need for autoscaling, but I'm still far from that situation.
|
The only thing that would make me change idea would be a need for autoscaling, but I'm still far from that situation.
|
||||||
|
|
||||||
### How do I use this?
|
### How do I use this?
|
||||||
The `caddy-docker-proxy` is the first container that should be started, after running `$ docker network create caddy` to ensure the external network exists on the system. The `Caddyfile` included and mounted in `/etc/caddy/caddyfile` is used in this case to give access to the air-gapped comtainers running on different machines on the same network.
|
The `caddy-docker-proxy` is the first container that should be started, after running `$ docker network create caddy` to ensure the external network exists on the system. The `Caddyfile` included and mounted in `/etc/caddy/Caddyfile` is used in this case to give access to the air-gapped comtainers running on different machines on the same network. An example is found in the [Caddyfile](https://gitea.oddone.dev/Doddophonique/compose-personal-stack/src/branch/caddy-revamp/caddy-docker-proxy/Caddyfile), where the [Memos](https://gitea.oddone.dev/Doddophonique/compose-personal-stack/src/branch/caddy-revamp/memos/docker-compose.yml) container is exposed.
|
||||||
As you can see, this is a borderline situation where some people may prefer having service discovery with either Swarm or Kubernetes, but in my experience this is still not enough to call for that.
|
As you can see, this is a borderline situation where some people may prefer having service discovery with either Swarm or Kubernetes, but in my experience this is still not enough to call for that.
|
||||||
|
|
||||||
### Conclusion (for now):
|
### Conclusion (for now):
|
||||||
|
|||||||
@ -11,3 +11,11 @@ subdomain.domain.tld {
|
|||||||
}
|
}
|
||||||
log
|
log
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# This is an example based on the docker-compose.yml contained
|
||||||
|
# in the memos folder
|
||||||
|
memos.domain.tld {
|
||||||
|
reverse_proxy 192.168.1.128:9000
|
||||||
|
encode zstd gzip
|
||||||
|
log
|
||||||
|
}
|
||||||
|
|||||||
53
memos/docker-compose.yml
Normal file
53
memos/docker-compose.yml
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
---
|
||||||
|
x-logging:
|
||||||
|
&default-logging
|
||||||
|
driver: syslog
|
||||||
|
options:
|
||||||
|
tag: "container_name/{{.Name}}"
|
||||||
|
labels: "LABEL"
|
||||||
|
syslog-facility: local7
|
||||||
|
|
||||||
|
x-opt-values:
|
||||||
|
&volume-opt
|
||||||
|
driver_opts: &options
|
||||||
|
type: "nfs"
|
||||||
|
o: "addr=${IP},rw"
|
||||||
|
|
||||||
|
services:
|
||||||
|
memos:
|
||||||
|
image: neosmemo/memos:stable
|
||||||
|
container_name: memos
|
||||||
|
# Use labels if this container is hosted on the same machine as
|
||||||
|
# the Caddy reverse proxy
|
||||||
|
labels:
|
||||||
|
caddy: ${MEMOS_HOSTNAME}
|
||||||
|
caddy.log:
|
||||||
|
caddy.encode: "zstd gzip"
|
||||||
|
caddy.reverse_proxy: "{{upstreams 5230}}"
|
||||||
|
restart: unless-stopped
|
||||||
|
# This is not needed if labels are used. If this container is
|
||||||
|
# hosted on a different machine under the same subnetwoork, use
|
||||||
|
# its private IP address instead of 192.168.1.128. Check the
|
||||||
|
# Caddyfile inside caddy-docker-proxy folder for an example
|
||||||
|
# on how to forward traffic to this container
|
||||||
|
#
|
||||||
|
# ports:
|
||||||
|
# - "192.168.1.128:9000:5230"
|
||||||
|
volumes:
|
||||||
|
- /mnt/path:/var/opt/memos
|
||||||
|
networks:
|
||||||
|
- caddy
|
||||||
|
logging: *default-logging
|
||||||
|
|
||||||
|
# Optional, needed if you are using an NFS server
|
||||||
|
#
|
||||||
|
# volumes:
|
||||||
|
# volume:
|
||||||
|
# <<: *volume-opt
|
||||||
|
# driver_opts:
|
||||||
|
# <<: *options
|
||||||
|
# device: ":/mnt/path"
|
||||||
|
|
||||||
|
networks:
|
||||||
|
caddy:
|
||||||
|
external: true
|
||||||
Loading…
x
Reference in New Issue
Block a user