Merge remote-tracking branch 'origin/main'
Some checks reported warnings
Build dockerfile / Build-dockerfile (push) Has been cancelled
Some checks reported warnings
Build dockerfile / Build-dockerfile (push) Has been cancelled
This commit is contained in:
commit
933c8bc06e
2 changed files with 46 additions and 0 deletions
21
.forgejo/workflows/build.yaml
Normal file
21
.forgejo/workflows/build.yaml
Normal file
|
@ -0,0 +1,21 @@
|
|||
name: Build dockerfile
|
||||
on: [push]
|
||||
|
||||
jobs:
|
||||
Build-dockerfile:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
- name: Login to Registry
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
registry: git.olympuslab.net
|
||||
username: ${{ secrets.CONTAINER_REGISTRY_USERNAME }}
|
||||
password: ${{ secrets.CONTAINER_REGISTRY_TOKEN }}
|
||||
- name: Build
|
||||
uses: docker/build-push-action@master
|
||||
with:
|
||||
context: .
|
||||
tags: git.olympuslab.net/alice/notes:latest
|
||||
load: true
|
25
Dockerfile
Normal file
25
Dockerfile
Normal file
|
@ -0,0 +1,25 @@
|
|||
FROM oven/bun
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get install -y git
|
||||
|
||||
WORKDIR /app/
|
||||
|
||||
RUN git clone https://github.com/TuanManhCao/digital-garden
|
||||
|
||||
ARG NODE_ENV=development
|
||||
|
||||
WORKDIR /app/digital-garden
|
||||
|
||||
RUN rm -rf posts/*
|
||||
|
||||
COPY Notes/ posts/.
|
||||
|
||||
COPY README.md posts/index.md
|
||||
|
||||
RUN bun install package.json
|
||||
|
||||
CMD ["bun","run","dev"]
|
||||
|
||||
|
||||
|
Loading…
Reference in a new issue