Compare commits

...

5 Commits

Author SHA1 Message Date
Leonard Excoffier
71dbefee17 ci: added default Docker Build Push file 2024-09-28 18:31:16 -04:00
Leonard Excoffier
0d71fb376c feat: added chmod for script, volume instruction, and basic program installation 2024-09-12 00:03:01 -04:00
Leonard Excoffier
bf4afa213b feat: basic entrypoint.sh template 2024-09-11 23:57:33 -04:00
Leonard Excoffier
c56c0104fc feat: build basic template for compose.ymal 2024-09-11 23:53:29 -04:00
Leonard Excoffier
ed778bbb5e fix: correctly mapped workdir 2024-09-11 23:43:25 -04:00
4 changed files with 63 additions and 1 deletions

27
.gitea/workflows/dbp.yaml Normal file
View File

@@ -0,0 +1,27 @@
name: Docker Build and Push
on:
# push:
branches:
- main
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@main
- name: Login to Gitea Container Registry
uses: docker/login-action@master
with:
registry: git.jisoonet.com
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }}
- name: Build and push Docker image
uses: docker/build-push-action@master
with:
context: .
push: true
tags: git.jisoonet.com/${{ gitea.repository }}:latest

View File

@@ -0,0 +1,18 @@
services:
PROJECT_NAME:
image: REGISTRY_URL/USERNAME/PROJECT_NAME
container_name: PROJECT_NAME
environment:
ENV_1: ${ENV_1}
volumes:
- PROJECT_NAME:/PROJECT_NAME/appdata
networks:
- PROJECT_NAME
volumes:
PROJECT_NAME:
name: PROJECT_NAME
networks:
PROJECT_NAME:
name: PROJECT_NAME

View File

@@ -1,8 +1,20 @@
FROM debian FROM debian
WORKDIR APPNAME ENV ENV_1=""
WORKDIR /PROJECT_NAME
RUN apt update && \
apt full-upgrade -y && \
apt install -y vim
RUN mkdir appdata
VOLUME /PROJECT_NAME/appdata
COPY entrypoint.sh . COPY entrypoint.sh .
RUN chmod +x entrypoint.sh
CMD["./entrypoint.sh"] CMD["./entrypoint.sh"]

View File

@@ -0,0 +1,5 @@
#!/bin/bash
# Check if the required environment variable(s) is/are set
: ${ENV_1}:?"Environment variable ENV_1 is required."