feat: Add Woodpecker CI/CD pipeline for automated deployments and update Docker Compose to pull images from Gitea registry with .env file integration.
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
Moh Dzulfikri Maulana
2026-03-10 08:31:48 +07:00
parent da231dd779
commit 5ed9efe458
2 changed files with 58 additions and 6 deletions

View File

@@ -1,15 +1,17 @@
services:
app:
build:
context: .
dockerfile: Dockerfile
image: fikri-portfolio-app
# Mengambil image dari Registry Gitea Anda
image: git.exavolt.web.id/fikri/portfolio-app:latest
container_name: fikri-portfolio-app
restart: always
ports:
- "4000:4000"
# Mengambil variabel dari file .env di folder yang sama
env_file:
- .env
environment:
# Aplikasi akan langsung menggunakan DATABASE_URL dari file .env (pointing ke DB existing Anda)
DATABASE_URL: ${DATABASE_URL}
JWT_SECRET: ${JWT_SECRET}
R2_TOKEN: ${R2_TOKEN}
@@ -18,7 +20,12 @@ services:
R2_ENDPOINT: ${R2_ENDPOINT}
R2_BUCKET_NAME: ${R2_BUCKET_NAME}
IMAGE_URL: ${IMAGE_URL}
# Tambahkan port agar internal container sesuai
PORT: 4000
extra_hosts:
- "host.docker.internal:host-gateway"
# Tetap jalankan migrasi database sebelum start
command: >
sh -c "npx prisma migrate deploy && node server.js"
sh -c "npx prisma migrate deploy && node server.js"