Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ref: general improvements #57

Merged
merged 3 commits into from
Aug 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 0 additions & 42 deletions .eslintrc.json

This file was deleted.

10 changes: 7 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,13 @@ on:
jobs:
format:
runs-on: ubuntu-latest

defaults:
run:
working-directory: ./apps/ui
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- run: npm install --only=dev
- run: npm run format
- name: Install dependencies
run: npm install --only=dev
- name: Format frontend code
run: npm run format
38 changes: 38 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Release

on:
push:
branches:
- main

jobs:
release:
permissions:
contents: write
issues: write
pull-requests: write
runs-on: ubuntu-22.04
strategy:
matrix:
node-version: [20]
steps:
- uses: actions/checkout@v4

- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 9

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'

- name: Install dependencies
run: pnpm add -g semantic-release @semantic-release/git @semantic-release/github

- name: Release
run: pnpm exec semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!--suppress HtmlDeprecatedAttribute -->
<p align="center">
<a href="">
<img src="./apps/ui/src/assets/logo.svg" height="220">
<img src="apps/ui/src/assets/logo.svg" height="220">
</a>
</p>

Expand Down
35 changes: 35 additions & 0 deletions apps/api/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# flyctl launch added from .gitignore
**/HELP.md
**/target
!**/.mvn/wrapper/maven-wrapper.jar
!**/**/src/main/**/target
!**/**/src/test/**/target

### STS ###
**/.apt_generated
**/.classpath
**/.factorypath
**/.project
**/.settings
**/.springBeans
**/.sts4-cache

### IntelliJ IDEA ###
**/.idea
**/*.iws
**/*.iml
**/*.ipr

### NetBeans ###
nbproject/private
nbbuild
dist
nbdist
.nb-gradle
**/build
!**/**/src/main/**/build
!**/**/src/test/**/build

### VS Code ###
**/.vscode
fly.toml
18 changes: 7 additions & 11 deletions apps/api/.gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
HELP.md
.gradle
build/
!gradle/wrapper/gradle-wrapper.jar
!**/src/main/**/build/
!**/src/test/**/build/
target/
!.mvn/wrapper/maven-wrapper.jar
!**/src/main/**/target/
!**/src/test/**/target/

### STS ###
.apt_generated
Expand All @@ -13,25 +12,22 @@ build/
.settings
.springBeans
.sts4-cache
bin/
!**/src/main/**/bin/
!**/src/test/**/bin/

### IntelliJ IDEA ###
.idea
*.iws
*.iml
*.ipr
out/
!**/src/main/**/out/
!**/src/test/**/out/

### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/
build/
!**/src/main/**/build/
!**/src/test/**/build/

### VS Code ###
.vscode/
19 changes: 19 additions & 0 deletions apps/api/.mvn/wrapper/maven-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
wrapperVersion=3.3.2
distributionType=only-script
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.7/apache-maven-3.9.7-bin.zip
26 changes: 11 additions & 15 deletions apps/api/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,28 +1,24 @@
# Use an official Gradle image to build the application
FROM gradle:8.5-jdk17 AS BUILD
FROM maven:3.9.8-eclipse-temurin-21-alpine AS builder

ENV APP_HOME=/usr/app/
WORKDIR $APP_HOME
COPY build.gradle settings.gradle $APP_HOME

COPY gradle $APP_HOME/gradle
COPY --chown=gradle:gradle . /home/gradle/src
USER root
RUN chown -R gradle /home/gradle/src
ENV APP_HOME=/app

COPY . .
WORKDIR $APP_HOME

RUN gradle clean build --no-daemon
COPY pom.xml .
RUN mvn dependency:go-offline -B
COPY src ./src
RUN mvn package -DskipTests

# Use an official OpenJDK runtime as a parent image
FROM openjdk:17-slim
FROM eclipse-temurin:21-jre-alpine

ENV ARTIFACT_NAME=api-0.0.1-SNAPSHOT.jar
ENV APP_HOME=/usr/app/
ENV APP_HOME=/app

WORKDIR $APP_HOME

COPY --from=BUILD $APP_HOME/build/libs/$ARTIFACT_NAME .
COPY --from=BUILD /home/gradle/src/src/main/resources/application.prod.yml /app/application.prod.yml
COPY --from=builder $APP_HOME/target/$ARTIFACT_NAME .
COPY --from=builder /app/src/main/resources/application.prod.yml ./application.prod.yml

ENTRYPOINT exec java -jar ${ARTIFACT_NAME} --spring.config.location=file:/app/application.prod.yml
60 changes: 0 additions & 60 deletions apps/api/build.gradle

This file was deleted.

Binary file removed apps/api/gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
7 changes: 0 additions & 7 deletions apps/api/gradle/wrapper/gradle-wrapper.properties

This file was deleted.

Loading
Loading