562c3770fb
Add a deploy workflow that builds and pushes the Docker image from the server working directory and runs docker compose on main. Trim CI to a focused Node build in an alpine container (apk deps, npm ci, npm run build) and remove the old docker workflow. Simplify Dockerfile to a builder+runtime flow (npm ci, npm prune, copy node_modules) and make docker-compose use the registry image and proxy network.
27 lines
553 B
YAML
27 lines
553 B
YAML
services:
|
|
cozy-den:
|
|
image: git.hiddenden.cafe/hiddenden/cozy-den:latest
|
|
container_name: cozy-den
|
|
# ports:
|
|
# - "3000:3000"
|
|
restart: unless-stopped
|
|
networks:
|
|
- proxy
|
|
environment:
|
|
- NODE_ENV=production
|
|
- HOST=0.0.0.0
|
|
- PORT=3000
|
|
- DB_PATH=/data/guestbook.db
|
|
- SECRET_KEY=${SECRET_KEY}
|
|
- ADMIN_SECRET_TOKEN=${ADMIN_SECRET_TOKEN}
|
|
- COOKIE_SECURE=${COOKIE_SECURE:-true}
|
|
volumes:
|
|
- guestbook_data:/data
|
|
|
|
volumes:
|
|
guestbook_data:
|
|
|
|
networks:
|
|
proxy:
|
|
external: true
|