Fix deployment

This commit is contained in:
2025-12-31 21:34:16 +03:00
Unverified
parent 0469b93274
commit de34747a34
4 changed files with 18 additions and 6 deletions
+12
View File
@@ -0,0 +1,12 @@
# Exclude data directory to prevent local database from being copied into production images
backend/data/
# Exclude logs
backend/logs/
# Exclude development files
node_modules/
.git/
.gitignore
README.md
*.log
-1
View File
@@ -6,7 +6,6 @@
FROM caddy:2-builder AS builder FROM caddy:2-builder AS builder
RUN xcaddy build \ RUN xcaddy build \
--with github.com/mholt/caddy-ratelimit --with github.com/mholt/caddy-ratelimit
RUN curl -o /etc/ssl/cloudflare-origin.crt https://developers.cloudflare.com/ssl/static/origin_ca_rsa_root.pem
FROM caddy:2 FROM caddy:2
+2 -1
View File
@@ -47,7 +47,6 @@ services:
context: ./caddy context: ./caddy
dockerfile: Dockerfile dockerfile: Dockerfile
restart: unless-stopped restart: unless-stopped
profiles: ["prod"]
ports: ports:
- "80:80" - "80:80"
- "443:443" - "443:443"
@@ -64,3 +63,5 @@ volumes:
name: fromchat-data name: fromchat-data
logs: logs:
name: fromchat-logs name: fromchat-logs
certs:
name: fromchat-certs
+1 -1
View File
@@ -10,7 +10,7 @@ StartLimitBurst=3
Type=simple Type=simple
User=root User=root
Group=root Group=root
ExecStart=/bin/docker compose up --profile prod ExecStart=/bin/docker compose up
ExecStop=/bin/docker compose down ExecStop=/bin/docker compose down
WorkingDirectory=/home/denis0001-dev/actions-runner/_work/FromChat/FromChat/deployment WorkingDirectory=/home/denis0001-dev/actions-runner/_work/FromChat/FromChat/deployment
Restart=always Restart=always