Skip to content

Commit

Permalink
Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
aceberg committed Jan 9, 2025
1 parent 3ea3e33 commit 3e0edd3
Show file tree
Hide file tree
Showing 10 changed files with 140 additions and 6 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/dev-docker-io.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Dev-to-docker

on:
workflow_dispatch:

env:
IMAGE_NAME: anyappstart
TAGS: dev


jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Build and Push Docker Image to docker.io
uses: mr-smithers-excellent/docker-build-push@v6
with:
image: ${{ secrets.DOCKER_USERNAME }}/${{ env.IMAGE_NAME }}
tags: ${{ env.TAGS }}
registry: docker.io
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
57 changes: 57 additions & 0 deletions .github/workflows/main-docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Main-Docker

on:
workflow_dispatch:
# push:
# branches: [ "main" ]
# paths:
# - 'Dockerfile'
# - 'src/**'

env:
IMAGE_NAME: anyappstart

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Get version tag from env file
uses: c-py/action-dotenv-to-setenv@v5
with:
env-file: .version

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3

- name: Login to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Build and push
uses: docker/build-push-action@v6
with:
context: .
platforms: linux/amd64,linux/i386,linux/arm/v6,linux/arm/v7,linux/arm64
push: true
tags: |
${{ secrets.DOCKER_USERNAME }}/${{ env.IMAGE_NAME }}:latest
${{ secrets.DOCKER_USERNAME }}/${{ env.IMAGE_NAME }}:${{ env.VERSION }}
ghcr.io/${{ secrets.DOCKER_USERNAME }}/${{ env.IMAGE_NAME }}:latest
ghcr.io/${{ secrets.DOCKER_USERNAME }}/${{ env.IMAGE_NAME }}:${{ env.VERSION }}
28 changes: 28 additions & 0 deletions .github/workflows/readme-dockerhub.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Readme-DockerHub

on:
workflow_dispatch:
push:
branches: [ "main" ]
paths:
- 'README.md'

env:
IMAGE_NAME: anyappstart

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Sync README.md to DockerHub
uses: ms-jpq/sync-dockerhub-readme@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
repository: ${{ secrets.DOCKER_USERNAME }}/${{ env.IMAGE_NAME }}
readme: "./README.md"

2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Change Log
All notable changes to this project will be documented in this file.

## [0.1.2] - 2025-01-08
## [0.1.2] - 2025-01-
### Added
- MobX store
- Goroutine for getting states
Expand Down
15 changes: 15 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FROM golang:alpine AS builder

RUN apk add build-base
COPY backend /src
RUN cd /src/cmd/AnyAppStart/ && CGO_ENABLED=0 go build -o /AnyAppStart .


FROM alpine:3

RUN apk add --no-cache docker tzdata

WORKDIR /app
COPY --from=builder /AnyAppStart /app/

ENTRYPOINT ["./AnyAppStart"]
2 changes: 1 addition & 1 deletion backend/internal/web/public/assets/index.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion backend/internal/web/public/assets/index.js

Large diffs are not rendered by default.

9 changes: 7 additions & 2 deletions frontend/src/App.css
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
/* VARS */
:root {
--transparent-light: #ffffff15;
}

/* Transparant icon button */
.shade-hover {
padding: 9px;
border-radius: 15%;
}
.shade-hover:hover {
background-color: #00000015;
background-color: var(--transparent-light);
cursor: pointer;
}

Expand All @@ -20,7 +25,7 @@
height: 2.5em;
}
.btn-tab:hover {
background-color: #00000015;
background-color: var(--transparent-light);
}

.btn-tab-main {
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/ConfigSettings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ function ConfigSettings(_props: any) {
<option value="dark">dark</option>
</select>
<label htmlFor="tid" className="form-label text-primary">NodePath</label>
<input className="form-control mb-3" defaultValue={appConfig.NodePath} id="tid" name="NodePath" onChange={handleChange}></input>
<input className="form-control mb-3" defaultValue={appConfig.NodePath} id="tid" name="NodePath" onChange={handleChange} placeholder="Path to local node-bootstrap (optional)"></input>
<hr></hr>
<div className='d-flex justify-content-between'>
<span></span>
Expand Down
3 changes: 3 additions & 0 deletions frontend/src/components/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ const Header: React.FC = observer(() => {
}

document.documentElement.setAttribute("data-bs-theme", color);
color === "dark"
? document.documentElement.style.setProperty('--transparent-light', '#ffffff15')
: document.documentElement.style.setProperty('--transparent-light', '#00000015');
}

useEffect(() => {
Expand Down

0 comments on commit 3e0edd3

Please sign in to comment.