Build files
Some checks failed
Deploy API / docker (ubuntu-latest, 2.44.0) (push) Failing after 26s

This commit is contained in:
Braydon 2024-09-08 16:19:15 -04:00
parent 91a24dc7e1
commit c53e1fd6bf
3 changed files with 58 additions and 0 deletions

@ -0,0 +1,31 @@
name: Deploy API
on:
push:
branches: ["master"]
paths-ignore:
- README.md
- LICENSE
jobs:
docker:
strategy:
matrix:
arch: ["ubuntu-latest"]
git-version: ["2.44.0"]
runs-on: ${{ matrix.arch }}
# Steps to run
steps:
# Checkout the repo
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
# Deploy to Dokku
- name: Deploy to Dokku
uses: dokku/github-action@master
with:
git_remote_url: "ssh://dokku@10.10.3.28:22/tether"
ssh_private_key: ${{ secrets.SSH_PRIVATE_KEY }}

26
Dockerfile Normal file

@ -0,0 +1,26 @@
# Stage 1: Build the application
FROM maven:3.9.6-eclipse-temurin-17-alpine AS builder
# Set the working directory
WORKDIR /home/container
# Copy the current directory contents into the container at /home/container
COPY . .
# Build the jar
RUN mvn package -q -Dmaven.test.skip -DskipTests -T2C -s ./settings.xml
# Stage 2: Create the final lightweight image
FROM eclipse-temurin:17.0.11_9-jre-focal
# Set the working directory
WORKDIR /home/container
# Copy the built jar file from the builder stage
COPY --from=builder /home/container/target/Tether.jar .
# We're running in production
ENV APP_ENV "production"
# Run the jar file
CMD java -jar Tether.jar -Djava.awt.headless=true

@ -26,6 +26,7 @@
<!-- Build Config --> <!-- Build Config -->
<build> <build>
<finalName>${project.artifactId}</finalName>
<plugins> <plugins>
<!-- Spring --> <!-- Spring -->
<plugin> <plugin>