Skip to content

Commit 91c4b06

Browse files
committed
Add Dockerfile and Docker compose file
1 parent 07a0982 commit 91c4b06

3 files changed

Lines changed: 61 additions & 0 deletions

File tree

.github/workflows/build.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Build and Push Docker image
2+
3+
on:
4+
push:
5+
branches: ["master"]
6+
workflow_dispatch:
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
12+
permissions:
13+
contents: read
14+
packages: write
15+
16+
steps:
17+
- name: Checkout source
18+
uses: actions/checkout@v4
19+
20+
- name: Log in to GitHub Container Registry
21+
uses: docker/login-action@v3
22+
with:
23+
registry: ghcr.io
24+
username: ${{ github.actor }}
25+
password: ${{ secrets.GITHUB_TOKEN }}
26+
27+
- name: Extract metadata (tags, labels)
28+
id: meta
29+
uses: docker/metadata-action@v5
30+
with:
31+
images: ghcr.io/${{ github.repository }}/marisastuff
32+
33+
- name: Build and push Docker image
34+
uses: docker/build-push-action@v6
35+
with:
36+
context: .
37+
file: ./Dockerfile
38+
push: true
39+
tags: ${{ steps.meta.outputs.tags }}
40+
labels: ${{ steps.meta.outputs.labels }}

Dockerfile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
FROM eclipse-temurin:24-jre
2+
3+
WORKDIR /app
4+
5+
COPY foxy/build/libs/MarisaStuff-*.jar MarisaStuff.jar
6+
7+
ENV JAVA_OPTS="-Xms256M -Xmx512M"
8+
ENTRYPOINT ["sh", "-c", "java $JAVA_OPTS -jar MarisaStuff.jar"]

docker-compose.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
version: "3.9"
2+
3+
services:
4+
marisa-stuff:
5+
image: ghcr.io/foxythebot/marisastuff:latest
6+
container_name: marisa-stuff
7+
restart: unless-stopped
8+
volumes:
9+
- /opt/marisa-stuff:/opt/marisa-stuff
10+
environment:
11+
JAVA_OPTS: "-Xms256M -Xmx512M"
12+
ports:
13+
- "5000:5000"

0 commit comments

Comments
 (0)