Skip to content

Commit

Permalink
Simple static site server
Browse files Browse the repository at this point in the history
  • Loading branch information
cb1kenobi committed Jan 19, 2024
0 parents commit f36427b
Show file tree
Hide file tree
Showing 11 changed files with 573 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .dockerignore
@@ -0,0 +1,5 @@
.git
.github
.gitignore
Dockerfile
LICENSE
2 changes: 2 additions & 0 deletions .github/FUNDING.yml
@@ -0,0 +1,2 @@
github: tidev
liberapay: tidev
13 changes: 13 additions & 0 deletions .github/workflows/cla.yml
@@ -0,0 +1,13 @@
name: Check CLA
on:
- pull_request

jobs:
check-cla:
runs-on: ubuntu-latest
name: Verify contributor

steps:
- uses: tidev/tidev-cla-action@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
53 changes: 53 additions & 0 deletions .github/workflows/deploy.yaml
@@ -0,0 +1,53 @@
name: 'Deploy'

on:
push:
branches:
- main
repository_dispatch:
types: [ deploy ]
workflow_dispatch:

concurrency:
group: ${{ github.ref }}
cancel-in-progress: true

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Cloning repo
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: tidev/jira-attachments.titaniumsdk.com

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to private registry
uses: docker/login-action@v3
with:
registry: ${{ secrets.TIDEV_REGISTRY_URL }}
username: ${{ secrets.TIDEV_REGISTRY_USERNAME }}
password: ${{ secrets.TIDEV_REGISTRY_PASSWORD }}

- name: Build and push
uses: docker/build-push-action@v5
with:
push: true
tags: ${{ secrets.TIDEV_REGISTRY_URL }}/${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

- name: Push to dokku
uses: dokku/github-action@master
with:
deploy_docker_image: ${{ secrets.TIDEV_REGISTRY_URL }}/${{ steps.meta.outputs.tags }}
git_push_flags: '--force'
git_remote_url: 'ssh://dokku@titaniumsdk.com:22/jira-attachments.titaniumsdk.com'
ssh_private_key: ${{ secrets.DO_SSH_PRIVATE_KEY }}
2 changes: 2 additions & 0 deletions .gitignore
@@ -0,0 +1,2 @@
node_modules
package-lock.json
11 changes: 11 additions & 0 deletions Dockerfile
@@ -0,0 +1,11 @@
FROM node:20-alpine

WORKDIR /app
COPY . /app

RUN corepack enable && \
pnpm install --frozen-lockfile

ENV NODE_ENV production
EXPOSE 80/tcp
CMD [ "pnpm", "start" ]
13 changes: 13 additions & 0 deletions LICENSE
@@ -0,0 +1,13 @@
Copyright 2022 TiDev, Inc. and Contributors

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
6 changes: 6 additions & 0 deletions README.md
@@ -0,0 +1,6 @@
# jira-attachments.titaniumsdk.com Website

## Dev

npm i
node server.js
11 changes: 11 additions & 0 deletions package.json
@@ -0,0 +1,11 @@
{
"name": "jira-attachments.titaniumsdk.com",
"version": "0.0.0",
"private": true,
"dependencies": {
"express": "^4.18.2"
},
"scripts": {
"run": "node server.js"
}
}

0 comments on commit f36427b

Please sign in to comment.