first commit
This commit is contained in:
@@ -0,0 +1,72 @@
|
||||
# Опционально: старый стек без Coolify (Caddy :9000 + lego)
|
||||
# docker compose -f docker-compose.standalone.yml up -d --build
|
||||
services:
|
||||
web:
|
||||
build: ./app
|
||||
container_name: remna-web
|
||||
restart: always
|
||||
env_file: .env
|
||||
environment:
|
||||
DATABASE_PATH: /data/app.db
|
||||
volumes:
|
||||
- web-data:/data
|
||||
expose:
|
||||
- "8000"
|
||||
networks:
|
||||
- site-network
|
||||
|
||||
lego:
|
||||
image: goacme/lego:v4.22.2
|
||||
container_name: remna-lego
|
||||
env_file: .env
|
||||
environment:
|
||||
CF_DNS_API_TOKEN: ${CLOUDFLARE_API_TOKEN}
|
||||
volumes:
|
||||
- lego-certs:/letsencrypt
|
||||
entrypoint: ["/bin/sh", "-c"]
|
||||
command:
|
||||
- |
|
||||
set -e
|
||||
CERT="/letsencrypt/certificates/rm.de4ima.uk.crt"
|
||||
if [ ! -f "$$CERT" ]; then
|
||||
/lego --path /letsencrypt --email "$$ACME_EMAIL" --domains rm.de4ima.uk --dns cloudflare --accept-tos run
|
||||
else
|
||||
/lego --path /letsencrypt --email "$$ACME_EMAIL" --domains rm.de4ima.uk --dns cloudflare --accept-tos renew --days 30 || true
|
||||
fi
|
||||
sleep infinity
|
||||
networks:
|
||||
- site-network
|
||||
restart: unless-stopped
|
||||
|
||||
caddy:
|
||||
image: caddy:2.9
|
||||
container_name: remna-caddy
|
||||
restart: always
|
||||
ports:
|
||||
- "0.0.0.0:9000:9000"
|
||||
volumes:
|
||||
- ./caddy/Caddyfile:/etc/caddy/Caddyfile:ro
|
||||
- lego-certs:/certs:ro
|
||||
- caddy-ssl-data:/data
|
||||
- caddy-config:/config
|
||||
depends_on:
|
||||
- web
|
||||
- lego
|
||||
entrypoint: ["/bin/sh", "-c"]
|
||||
command:
|
||||
- |
|
||||
CERT="/certs/certificates/rm.de4ima.uk.crt"
|
||||
while [ ! -f "$$CERT" ]; do sleep 2; done
|
||||
exec caddy run --config /etc/caddy/Caddyfile --adapter caddyfile
|
||||
networks:
|
||||
- site-network
|
||||
|
||||
networks:
|
||||
site-network:
|
||||
name: remna-site-network
|
||||
|
||||
volumes:
|
||||
web-data:
|
||||
lego-certs:
|
||||
caddy-ssl-data:
|
||||
caddy-config:
|
||||
Reference in New Issue
Block a user