-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.yaml
More file actions
84 lines (78 loc) · 2.03 KB
/
Copy pathcompose.yaml
File metadata and controls
84 lines (78 loc) · 2.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# Podman-compose / Docker-compose file for the dev-blog stack.
#
# This is provided as a convenience for local iteration; production deployments
# should use the Quadlet units in ./quadlet/ which integrate with systemd.
#
# Usage:
# podman compose up --build
#
# The Caddy container needs a Google Cloud service-account JSON key mounted at
# /run/secrets/gcp-dns.json for the ACME DNS-01 challenge to work. For local
# HTTP-only development, set SITE_ADDRESS=http://:80 in your shell or .env.
name: dev-blog
networks:
dev-blog:
driver: bridge
volumes:
caddy-data:
caddy-config:
services:
app:
build:
context: .
dockerfile: Containerfile
image: localhost/dev-blog-app:latest
container_name: dev-blog-app
restart: unless-stopped
environment:
NODE_ENV: production
HOST: 0.0.0.0
PORT: "4321"
ASTRO_TELEMETRY_DISABLED: "1"
networks:
- dev-blog
expose:
- "4321"
read_only: true
tmpfs:
- /tmp:size=64m,mode=1777
cap_drop:
- ALL
security_opt:
- no-new-privileges:true
caddy:
build:
context: ./caddy
dockerfile: Containerfile
image: localhost/dev-blog-caddy:latest
container_name: dev-blog-caddy
restart: unless-stopped
depends_on:
- app
environment:
SITE_ADDRESS: ${SITE_ADDRESS:-https://example.com}
ACME_EMAIL: ${ACME_EMAIL:-admin@example.com}
GCP_PROJECT: ${GCP_PROJECT:-my-gcp-project}
GOOGLE_APPLICATION_CREDENTIALS: /run/secrets/gcp-dns.json
secrets:
- gcp-dns
networks:
- dev-blog
ports:
- "${HTTP_PORT:-80}:80"
- "${HTTPS_PORT:-443}:443"
- "${HTTPS_PORT:-443}:443/udp"
volumes:
- caddy-data:/data
- caddy-config:/config
cap_drop:
- ALL
cap_add:
- NET_BIND_SERVICE
security_opt:
- no-new-privileges:true
secrets:
gcp-dns:
# Path to a Google Cloud service-account JSON key with permission to
# update Cloud DNS records for the SITE_ADDRESS zone.
file: ./secrets/gcp-dns.json