Skip to content

Commit

Permalink
Merge pull request #90 from lnls-sirius/deploy
Browse files Browse the repository at this point in the history
Deploy Improvements
  • Loading branch information
RafaelLyra8 authored Oct 2, 2023
2 parents 2d3a4c8 + 54d6da4 commit 79023cc
Show file tree
Hide file tree
Showing 13 changed files with 62 additions and 71 deletions.
1 change: 1 addition & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
VERSION=1.3.3
31 changes: 31 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Archiver Viewer CD

on:
release:
types: [created]

jobs:
deploy:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout 🛎️
uses: actions/checkout@master

- name: Login to GitHub Container Registry 🔓
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Write deploy tag
run: echo "VERSION=${GITHUB_REF_NAME#v}" > .env

- name: Build Docker Compose 🏗️
run: docker-compose build

- name: Push Docker Compose 🪖
run: docker-compose push
7 changes: 3 additions & 4 deletions scripts/Dockerfile → Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ COPY package*.json ./

RUN npm install --loglevel verbose

COPY --chown=node:node .git .git
COPY --chown=node:node .git .git
COPY --chown=node:node tsconfig.json tsconfig.json
COPY --chown=node:node .babelrc .babelrc
COPY --chown=node:node .eslintrc.js .eslintrc.js
Expand All @@ -29,6 +29,5 @@ RUN rm --recursive --verbose .git

FROM nginx:1.18-alpine

COPY --chown=nginx:nginx --from=builder /home/node/app/build /usr/share/nginx/html/archiver-viewer
COPY ./scripts/nginx/default.conf /etc/nginx/conf.d/default.conf

COPY --chown=nginx:nginx --from=builder /home/node/app/build /usr/share/nginx/html/
COPY ./nginx/default.conf /etc/nginx/conf.d/default.conf
17 changes: 17 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
version: "3.8"
services:
archiver-viewer:
container_name: 'archiver-viewer'
image: 'ghcr.io/lnls-sirius/archiver-viewer:${VERSION}'
build:
context: .
ports:
- 8080:80

archiver-viewer-latest:
container_name: 'archiver-viewer'
image: 'ghcr.io/lnls-sirius/archiver-viewer'
build:
context: .
ports:
- 8080:80
File renamed without changes.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name": "archiver-viewer",
"homepage": ".",
"version": "2.0.0",
"homepage": "https://github.com/lnls-sirius/archiver-viewer",
"version": "1.3.3",
"description": "Epics Archiver Viewer",
"main": "init",
"author": "Claudio F. Carneiro",
"author": "SwC",
"license": "GPLv3",
"browserslist": [
"> 0.5% in BR, Firefox ESR, not dead"
Expand Down Expand Up @@ -85,7 +85,7 @@
"typescript": "4.1.3",
"webpack": "^5.78.0",
"webpack-bundle-analyzer": "4.5.0",
"webpack-cli": "^4.9.1",
"webpack-cli": "^4.10.0",
"webpack-dev-server": "^4.9.0"
},
"madge": {
Expand Down
18 changes: 0 additions & 18 deletions scripts/build-image.sh

This file was deleted.

14 changes: 0 additions & 14 deletions scripts/config.sh

This file was deleted.

20 changes: 0 additions & 20 deletions scripts/docker-compose.yml

This file was deleted.

8 changes: 0 additions & 8 deletions scripts/push-image.sh

This file was deleted.

2 changes: 1 addition & 1 deletion src/components/Footer/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from "react";
import * as S from "./styled";

const version = "2022-09-06-cabf52d";
const version = "2023-09-29-2d3a4c8";

const Footer: React.FC = () => {
return (
Expand Down
5 changes: 4 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,8 @@
"moduleResolution": "node",
"lib": ["ES2020", "es6", "dom"],
"typeRoots": ["node_modules/@types", "src/types"]
}
},
"include": [
"**/*.d.ts"
]
}

0 comments on commit 79023cc

Please sign in to comment.