docker
This commit is contained in:
parent
5717d79a5f
commit
89bfbd2cb8
2 changed files with 44 additions and 0 deletions
32
.forgejo/workflows/build.yml
Normal file
32
.forgejo/workflows/build.yml
Normal file
|
@ -0,0 +1,32 @@
|
|||
name: build
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: host
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
|
||||
- name: Log in to Docker Hub
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
registry: git.hydrar.de
|
||||
username: ${{ secrets.registry_user }}
|
||||
password: ${{ secrets.registry_password }}
|
||||
|
||||
- name: Build and push Docker image
|
||||
uses: docker/build-push-action@v4
|
||||
with:
|
||||
context: .
|
||||
platforms: linux/amd64
|
||||
push: true
|
||||
tags: git.hydrar.de/red/cdb_ui:latest
|
12
Dockerfile
Normal file
12
Dockerfile
Normal file
|
@ -0,0 +1,12 @@
|
|||
FROM git.hydrar.de/hydra/flutter AS build-env
|
||||
|
||||
# Copy files to container and build
|
||||
RUN mkdir /app/
|
||||
COPY . /app/
|
||||
WORKDIR /app/
|
||||
RUN flutter pub get
|
||||
RUN flutter build web
|
||||
|
||||
# Create the run-time image
|
||||
FROM nginx:1.21.1-alpine
|
||||
COPY --from=build-env /app/build/web /usr/share/nginx/html/web
|
Loading…
Reference in a new issue