Add docker file and an action
Some checks failed
Build release image / build (push) Failing after 3m0s
Some checks failed
Build release image / build (push) Failing after 3m0s
This commit is contained in:
parent
1af27b3e8f
commit
6b2b8395ce
47
.gitea/workflows/release.yaml
Normal file
47
.gitea/workflows/release.yaml
Normal file
@ -0,0 +1,47 @@
|
||||
name: Build release image
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "*.*.*"
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-22.04
|
||||
container:
|
||||
image: git.nicelycomposed.codes/koshyk-io/flutter-gitea-action-image-builder:latest
|
||||
credentials:
|
||||
username: ${{ secrets.IMAGE_REGISTRY_USER }}
|
||||
password: ${{ secrets.IMAGE_REGISTRY_PASSWORD }}
|
||||
steps:
|
||||
- name: Checkout source code
|
||||
uses: actions/checkout@v4
|
||||
- name: Set up NodeJS
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 18
|
||||
- name: Get dependencies
|
||||
working-directory: ${{ gitea.workspace }}
|
||||
run: |
|
||||
npm install --global yarn
|
||||
yarn
|
||||
- name: Build website
|
||||
working-directory: ${{ gitea.workspace }}
|
||||
run: |
|
||||
yarn build
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
- name: Login to Registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: git.nicelycomposed.codes
|
||||
username: ${{ secrets.IMAGE_REGISTRY_USER }}
|
||||
password: ${{ secrets.IMAGE_REGISTRY_PASSWORD }}
|
||||
- name: Build docker image
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: .
|
||||
push: true
|
||||
tags: |
|
||||
git.nicelycomposed.codes/yehor/www-yevi-org:${{ gitea.ref_name }}
|
||||
git.nicelycomposed.codes/yehor/www-yevi-org:latest
|
7
Dockerfile
Normal file
7
Dockerfile
Normal file
@ -0,0 +1,7 @@
|
||||
FROM nginx:1.27.0
|
||||
|
||||
COPY ./build /usr/share/nginx/html
|
||||
|
||||
COPY ./nginx.conf /etc/nginx/nginx.conf
|
||||
|
||||
EXPOSE 80
|
50
nginx.conf
Normal file
50
nginx.conf
Normal file
@ -0,0 +1,50 @@
|
||||
user nginx;
|
||||
worker_processes auto;
|
||||
|
||||
error_log /var/log/nginx/error.log notice;
|
||||
pid /var/run/nginx.pid;
|
||||
|
||||
|
||||
events {
|
||||
worker_connections 1024;
|
||||
}
|
||||
|
||||
|
||||
http {
|
||||
include /etc/nginx/mime.types;
|
||||
default_type application/octet-stream;
|
||||
|
||||
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
|
||||
'$status $body_bytes_sent "$http_referer" '
|
||||
'"$http_user_agent" "$http_x_forwarded_for"';
|
||||
|
||||
access_log /var/log/nginx/access.log main;
|
||||
|
||||
sendfile on;
|
||||
#tcp_nopush on;
|
||||
|
||||
keepalive_timeout 65;
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
server_name localhost;
|
||||
|
||||
gzip on;
|
||||
gzip_types text/html application/javascript application/json text/css;
|
||||
|
||||
# where the root here
|
||||
root /usr/share/nginx/html;
|
||||
# what file to server as index
|
||||
index index.html;
|
||||
|
||||
error_page 404 /404.html;
|
||||
|
||||
# redirect server error pages to the static page /50x.html
|
||||
#
|
||||
#error_page 500 502 503 504 /50x.html;
|
||||
#location = /50x.html {
|
||||
# root /usr/share/nginx/html;
|
||||
#}
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user