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
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
@@ -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"
|
||||
Reference in New Issue
Block a user