updated ci
All checks were successful
Build and Push Docker Image / build-and-push (release) Successful in 48s
All checks were successful
Build and Push Docker Image / build-and-push (release) Successful in 48s
This commit is contained in:
15
.dockerignore
Normal file
15
.dockerignore
Normal file
@ -0,0 +1,15 @@
|
||||
#.dockerignore
|
||||
# Gitea
|
||||
.gitea
|
||||
|
||||
# Docker
|
||||
.dockerignore
|
||||
dockerfile
|
||||
compose.yaml
|
||||
compose.yml
|
||||
|
||||
# Git
|
||||
.gitignore
|
||||
*.md
|
||||
example.env
|
||||
LICENSE
|
||||
49
.gitea/workflows/docker-build-push.yaml
Normal file
49
.gitea/workflows/docker-build-push.yaml
Normal file
@ -0,0 +1,49 @@
|
||||
|
||||
name: Build and Push Docker Image
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
|
||||
env:
|
||||
REGISTRY: git.frik.su
|
||||
IMAGE_NAME: ${{ gitea.repository }}
|
||||
|
||||
jobs:
|
||||
build-and-push:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Install Docker
|
||||
run: curl -fsSL https://get.docker.com | sh
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
|
||||
- name: Login to registry
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
registry: ${{ env.REGISTRY }}
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
|
||||
- name: Extract Docker tags from release
|
||||
id: meta
|
||||
uses: docker/metadata-action@v4
|
||||
with:
|
||||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
||||
tags: |
|
||||
type=ref,event=tag
|
||||
type=semver,pattern={{version}}
|
||||
type=semver,pattern={{major}}.{{minor}}
|
||||
type=semver,pattern={{major}}
|
||||
|
||||
- name: Build and push Docker image
|
||||
uses: docker/build-push-action@v4
|
||||
with:
|
||||
context: .
|
||||
push: true
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
89
.gitignore
vendored
Normal file
89
.gitignore
vendored
Normal file
@ -0,0 +1,89 @@
|
||||
# compiled output
|
||||
/dist
|
||||
/tmp
|
||||
/out-tsc
|
||||
|
||||
# Runtime data
|
||||
pids
|
||||
*.pid
|
||||
*.seed
|
||||
*.pid.lock
|
||||
|
||||
# Directory for instrumented libs generated by jscoverage/JSCover
|
||||
lib-cov
|
||||
|
||||
# Coverage directory used by tools like istanbul
|
||||
coverage
|
||||
|
||||
# nyc test coverage
|
||||
.nyc_output
|
||||
|
||||
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
|
||||
.grunt
|
||||
|
||||
# Bower dependency directory (https://bower.io/)
|
||||
bower_components
|
||||
|
||||
# node-waf configuration
|
||||
.lock-wscript
|
||||
|
||||
# IDEs and editors
|
||||
.idea
|
||||
.project
|
||||
.classpath
|
||||
.c9/
|
||||
*.launch
|
||||
.settings/
|
||||
*.sublime-workspace
|
||||
|
||||
# IDE - VSCode
|
||||
.vscode/*
|
||||
!.vscode/settings.json
|
||||
!.vscode/tasks.json
|
||||
!.vscode/launch.json
|
||||
!.vscode/extensions.json
|
||||
|
||||
# misc
|
||||
.sass-cache
|
||||
connect.lock
|
||||
typings
|
||||
|
||||
# Logs
|
||||
logs
|
||||
*.log
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
|
||||
|
||||
# Dependency directories
|
||||
node_modules/
|
||||
jspm_packages/
|
||||
|
||||
# Optional npm cache directory
|
||||
.npm
|
||||
|
||||
# Optional eslint cache
|
||||
.eslintcache
|
||||
|
||||
# Optional REPL history
|
||||
.node_repl_history
|
||||
|
||||
# Output of 'npm pack'
|
||||
*.tgz
|
||||
|
||||
# Yarn Integrity file
|
||||
.yarn-integrity
|
||||
|
||||
# dotenv environment variables file
|
||||
.env
|
||||
|
||||
# next.js build output
|
||||
.next
|
||||
|
||||
# Lerna
|
||||
lerna-debug.log
|
||||
|
||||
# System Files
|
||||
.DS_Store
|
||||
Thumbs.db
|
||||
@ -13,14 +13,16 @@ services:
|
||||
image: git.frik.su/Beesquit/work-timerer:latest
|
||||
container_name: work-timerer
|
||||
ports:
|
||||
4000:80
|
||||
restart: unless stopped
|
||||
- 4000:80
|
||||
volumes:
|
||||
- ./src:/usr/share/nginx/html
|
||||
restart: unless-stopped
|
||||
```
|
||||
|
||||
The application should be available at the `localhost:4000`
|
||||
|
||||
### Todo:
|
||||
-[ ] Make travel time customizable with env
|
||||
- [ ] Make travel time customizable with env
|
||||
|
||||
### Limitations:
|
||||
- The app is linked to the system time
|
||||
|
||||
@ -0,0 +1,9 @@
|
||||
services:
|
||||
work-timerer:
|
||||
image: git.frik.su/Beesquit/work-timerer:latest
|
||||
container_name: work-timerer
|
||||
ports:
|
||||
- 4000:80
|
||||
volumes:
|
||||
- ./src:/usr/share/nginx/html
|
||||
restart: unless-stopped
|
||||
|
||||
7
dockerfile
Normal file
7
dockerfile
Normal file
@ -0,0 +1,7 @@
|
||||
FROM nginx:alpine
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY src/ /usr/share/nginx/html
|
||||
|
||||
CMD ["nginx", "-g", "daemon off;"]
|
||||
Reference in New Issue
Block a user