mirror of
https://git.mills.io/prologic/zs
synced 2025-03-20 15:03:55 +03:00
Add default Dockerfile
This commit is contained in:
parent
e28fdad29b
commit
37133be5b9
81
.drone.yml
81
.drone.yml
@ -1,81 +0,0 @@
|
|||||||
---
|
|
||||||
kind: pipeline
|
|
||||||
type: exec
|
|
||||||
name: 🚀 CI
|
|
||||||
|
|
||||||
platform:
|
|
||||||
os: linux
|
|
||||||
arch: amd64
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: 🛠️ Build
|
|
||||||
commands:
|
|
||||||
- make build
|
|
||||||
|
|
||||||
- name: 🧪 Test
|
|
||||||
commands:
|
|
||||||
- make test
|
|
||||||
|
|
||||||
trigger:
|
|
||||||
branch:
|
|
||||||
- main
|
|
||||||
event:
|
|
||||||
- tag
|
|
||||||
- push
|
|
||||||
- pull_request
|
|
||||||
|
|
||||||
---
|
|
||||||
kind: pipeline
|
|
||||||
name: 🐳 Docker
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: 📦 Image
|
|
||||||
image: plugins/kaniko
|
|
||||||
settings:
|
|
||||||
repo: prologic/zs
|
|
||||||
tags: latest
|
|
||||||
build_args:
|
|
||||||
- VERSION=latest
|
|
||||||
- COMMIT=${DRONE_COMMIT_SHA:0:8}
|
|
||||||
username:
|
|
||||||
from_secret: dockerhub_username
|
|
||||||
password:
|
|
||||||
from_secret: dockerhub_password
|
|
||||||
when:
|
|
||||||
branch:
|
|
||||||
- main
|
|
||||||
event:
|
|
||||||
- push
|
|
||||||
|
|
||||||
depends_on:
|
|
||||||
- 🚀 CI
|
|
||||||
|
|
||||||
trigger:
|
|
||||||
branch:
|
|
||||||
- main
|
|
||||||
event:
|
|
||||||
- push
|
|
||||||
|
|
||||||
---
|
|
||||||
kind: pipeline
|
|
||||||
name: 🥳 Done
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: 🔔 Notify
|
|
||||||
image: plugins/webhook
|
|
||||||
settings:
|
|
||||||
urls:
|
|
||||||
- https://msgbus.mills.io/ci.mills.io
|
|
||||||
|
|
||||||
depends_on:
|
|
||||||
- 🚀 CI
|
|
||||||
- 🐳 Docker
|
|
||||||
|
|
||||||
trigger:
|
|
||||||
branch:
|
|
||||||
- main
|
|
||||||
event:
|
|
||||||
- tag
|
|
||||||
- push
|
|
||||||
- pull_request
|
|
||||||
|
|
18
default/Dockerfile
Normal file
18
default/Dockerfile
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
# Build
|
||||||
|
FROM prologic/zs AS build
|
||||||
|
|
||||||
|
RUN mkdir -p /src
|
||||||
|
|
||||||
|
WORKDIR /src
|
||||||
|
|
||||||
|
# Copy content
|
||||||
|
COPY . .
|
||||||
|
|
||||||
|
# Build the site (in production mode)
|
||||||
|
RUN zs -D -p build > build.log 2>&1
|
||||||
|
|
||||||
|
# Runtime
|
||||||
|
FROM prologic/zs AS runtime
|
||||||
|
|
||||||
|
COPY --from=build /src/.pub /data
|
||||||
|
COPY --from=build /src/build.log /
|
Loading…
x
Reference in New Issue
Block a user