Merge pull request #6 from fLotte-meets-HWR-DB/actions

Actions
pull/8/head
Trivernis 4 years ago committed by GitHub
commit 73d9a7c2c0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -0,0 +1,37 @@
name: Build Docker Image
on:
push:
branches: [ main ]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Copy Repo Files
uses: actions/checkout@master
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to Portus
uses: docker/login-action@v1
with:
registry: https://flotte-docker-registry.spdns.org/
username: ${{ secrets.PORTUS_USERNAME }}
password: ${{ secrets.PORTUS_PASSWORD }}
- name: Build and push
uses: docker/build-push-action@v2
with:
context: .
file: ./Dockerfile
platforms: linux/amd64,linux/arm/v7,linux/arm64
push: true
tags: |
flotte-docker-registry.spdns.org/frontend-server:latest

@ -1,6 +1,7 @@
FROM node:14.14.0-alpine3.10 AS builder FROM node:14.14.0-alpine3.10 AS builder
WORKDIR / WORKDIR /
COPY package.json package-lock.json ./ COPY package.json package-lock.json ./
RUN apk add --no-cache python3
RUN npm install && npm install -g @angular/cli && mkdir frontend RUN npm install && npm install -g @angular/cli && mkdir frontend
RUN mv node_modules ./frontend RUN mv node_modules ./frontend
WORKDIR /frontend WORKDIR /frontend
@ -12,7 +13,7 @@ FROM golang:1.13.4-alpine as builder2
ARG ARCH=amd64 ARG ARCH=amd64
RUN apk add git RUN apk add git
WORKDIR / WORKDIR /
COPY --from=builder /frontend/dist /dist COPY --from=builder /frontend/dist /dist
RUN go get github.com/rakyll/statik RUN go get github.com/rakyll/statik
RUN statik --src=/dist/flotte-frontend RUN statik --src=/dist/flotte-frontend
COPY *.go *.sum *.mod / COPY *.go *.sum *.mod /

@ -1,6 +1,6 @@
# FlotteFrontend # FlotteFrontend
[![Build Status](https://travis-ci.com/fLotte-meets-HWR-DB/frontend.svg?token=YfRmpHAXqyUafCgSEexw&branch=master)](https://travis-ci.com/fLotte-meets-HWR-DB/frontend) ![Build Docker Image](https://github.com/fLotte-meets-HWR-DB/frontend/workflows/Build%20Docker%20Image/badge.svg)
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 10.0.8. This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 10.0.8.
@ -59,4 +59,4 @@ We can't pass it in an other form, else it would not be possible to pass a value
If the backend url changes, it has to be changed in the following files: If the backend url changes, it has to be changed in the following files:
- ./src/environments/ - ./src/environments/
- ./apollo.config.js for autocompletion when writing queries etc. - ./apollo.config.js for autocompletion when writing queries etc.
- ./codegen.yml for graphQL codegen (to generate schema, types etc.) - ./codegen.yml for graphQL codegen (to generate schema, types etc.)

Loading…
Cancel
Save