a6e4e2cf6d
This commit transitions the application from being served as a static site via Nginx to a full Node.js application, likely Next.js. The Dockerfile has been completely rewritten to use a multi-stage build process: - A `builder` stage installs dependencies and builds the application. - A lean `runner` stage copies only the necessary production artifacts and dependencies to run the application server. The `.drone.yml` configuration has been updated to align with this new build process and to trigger builds on the `develop` branch in addition to `main`.
42 lines
1007 B
YAML
42 lines
1007 B
YAML
################################################################################
|
|
# web
|
|
################################################################################
|
|
kind: pipeline
|
|
type: docker
|
|
name: (landing) build form and push to artifactory
|
|
|
|
steps:
|
|
- name: tag
|
|
image: alpine/git:2.40.1
|
|
environment:
|
|
GOOS: linux
|
|
GOARCH: amd64
|
|
CGO_ENABLED: 0
|
|
settings:
|
|
debug: true
|
|
commands:
|
|
- APP_VERSION=$(git rev-list HEAD --count --no-merges)-$DRONE_BRANCH
|
|
- echo "APP Version tags $APP_VERSION"
|
|
- echo -n "$APP_VERSION" >> .tags
|
|
|
|
- name: build landing
|
|
image: plugins/docker
|
|
settings:
|
|
# build_args:
|
|
# - BUILD_APP=scraper
|
|
username: cicd
|
|
password:
|
|
from_secret: REGISTRY_PASSWORD
|
|
# dockerfile: Dockerfile-drone
|
|
repo: artifactory.ravanertebat.ir/tm/landing
|
|
registry: artifactory.ravanertebat.ir
|
|
|
|
node:
|
|
tag: aecde-docker-runner
|
|
trigger:
|
|
branch:
|
|
- main
|
|
- develop
|
|
event:
|
|
- custom
|