-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
51 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
name: "build feature branch" | ||
on: [ push ] | ||
jobs: | ||
"Build_Docker_Container": | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
- name: Build container | ||
run: docker buildx build -t react-open-arch . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
FROM node:20-alpine as builder | ||
|
||
WORKDIR /app | ||
|
||
COPY . . | ||
|
||
RUN ["npm", "ci"] | ||
RUN ["npm", "run", "build"] | ||
|
||
FROM nginx:stable as nginx | ||
WORKDIR /app | ||
COPY --from=builder /app/dist ./static/ | ||
COPY ./nginx.conf /etc/nginx/nginx.conf | ||
|
||
EXPOSE 8080 | ||
|
||
CMD ["nginx", "-g", "daemon off;"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
events { | ||
worker_connections 1024; | ||
} | ||
|
||
http { | ||
include mime.types; | ||
sendfile on; | ||
|
||
server { | ||
listen 8080; | ||
listen [::]:8080; | ||
|
||
resolver 127.0.0.11; | ||
autoindex off; | ||
|
||
server_name _; | ||
server_tokens off; | ||
|
||
root /app/static; | ||
gzip_static on; | ||
} | ||
} |