Add CI #1

Merged
pgrondek merged 12 commits from ci into main 2023-09-14 20:58:46 +00:00
3 changed files with 27 additions and 3 deletions
Showing only changes of commit dcb353bacb - Show all commits

View File

@ -1,5 +1,12 @@
pipeline:
build:
steps:
build-static:
image: "node:20"
commands:
- npm run build
build-docker:
image: "docker:24.0.6-dind"
commands:
# - docker build -t docker.grondek.pl/react-homepage:0.1 .
- docker buildx build --platform linux/arm64,linux/amd64 --push -t docker.grondek.pl/react-homepage:0.1 .
# when:
# - branch: [ master, main ]

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;
}
}