Add CI
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/tag/woodpecker Pipeline was successful

Co-authored-by: Przemek Grondek <przemek@grondek.pl>
Co-committed-by: Przemek Grondek <przemek@grondek.pl>
This commit is contained in:
Przemek Grondek 2023-09-14 20:58:42 +00:00 committed by pgrondek
parent 994e2ba306
commit 9e3f9d9a7a
4 changed files with 37 additions and 0 deletions

19
.woodpecker.yml Normal file
View File

@ -0,0 +1,19 @@
steps:
build-static:
image: "node:20"
commands:
- npm install
- npm run build
build-docker:
image: woodpeckerci/plugin-docker-buildx
secrets:
- docker_username
- docker_password
settings:
registry: docker.grondek.pl
repo: docker.grondek.pl/react-homepage
auto_tag: true
tags: latest
platforms: linux/arm64
when:
event: tag

8
Dockerfile Normal file
View File

@ -0,0 +1,8 @@
FROM nginx:1.24.0-alpine
ENV NODE_ENV production
RUN rm -rf /usr/share/nginx/html/*
COPY out /usr/share/nginx/html/
COPY docker/nginx.conf /etc/nginx/conf.d/default.conf

9
docker/nginx.conf Normal file
View File

@ -0,0 +1,9 @@
server {
listen 80;
location / {
root /usr/share/nginx/html/;
include /etc/nginx/mime.types;
try_files $uri $uri/ /index.html;
}
}

View File

@ -1,5 +1,6 @@
/** @type {import('next').NextConfig} */
const nextConfig = {
output: 'export',
reactStrictMode: true,
}