Consolidate CI and deployment workflows
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.
This commit is contained in:
+9
-3
@@ -1,10 +1,12 @@
|
||||
services:
|
||||
cozy-den:
|
||||
build: .
|
||||
image: git.hiddenden.cafe/hiddenden/cozy-den:latest
|
||||
container_name: cozy-den
|
||||
ports:
|
||||
- "3000:3000"
|
||||
# ports:
|
||||
# - "3000:3000"
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- proxy
|
||||
environment:
|
||||
- NODE_ENV=production
|
||||
- HOST=0.0.0.0
|
||||
@@ -18,3 +20,7 @@ services:
|
||||
|
||||
volumes:
|
||||
guestbook_data:
|
||||
|
||||
networks:
|
||||
proxy:
|
||||
external: true
|
||||
|
||||
Reference in New Issue
Block a user