forked from carneirofc/cons-webgraph
-
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.
Merge pull request #4 from lnls-sirius/rads
Improve deployment
- Loading branch information
Showing
8 changed files
with
17,148 additions
and
12,603 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,28 @@ | ||
name: Gamma Monitor CD | ||
|
||
on: | ||
release: | ||
types: [created] | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
packages: write | ||
steps: | ||
- name: Checkout 🛎️ | ||
uses: actions/checkout@master | ||
|
||
- name: Build Docker Compose 🏗️ | ||
run: docker-compose build | ||
|
||
- name: Login to GitHub Container Registry 🔓 | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GAMMA_MON }} | ||
|
||
- name: Push Docker Compose 🪖 | ||
run: docker-compose push |
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,24 @@ | ||
FROM node:19-alpine3.16 AS builder | ||
|
||
# General information about the code | ||
LABEL maintainer="SwC <[email protected]>" | ||
|
||
# Set the container directories | ||
WORKDIR /app | ||
|
||
COPY package*.json ./ | ||
COPY . . | ||
|
||
# Install the desired packages with npm | ||
RUN npm install | ||
RUN npm run build | ||
|
||
FROM nginx:1.24 | ||
WORKDIR /usr/share/nginx/html | ||
RUN rm -rf ./* | ||
COPY --from=builder /app/build . | ||
RUN rm /etc/nginx/conf.d/default.conf | ||
COPY nginx/nginx.conf /etc/nginx/conf.d | ||
|
||
EXPOSE 80 | ||
ENTRYPOINT ["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,10 @@ | ||
version: '3.8' | ||
|
||
services: | ||
vacs: | ||
container_name: 'gamma-mon' | ||
image: 'ghcr.io/lnls-sirius/gamma-mon:1.0.1' | ||
build: | ||
context: . | ||
ports: | ||
- 80:80 |
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 @@ | ||
server { | ||
listen 80; | ||
location / { | ||
root /usr/share/nginx/html; | ||
index index.html index.html; | ||
try_files $uri $uri/ /index.html; | ||
} | ||
error_page 500 502 503 504 /50x.html; | ||
location = /50x.html { | ||
root /usr/share/nginx/html; | ||
} | ||
} |
Oops, something went wrong.