Skip to content

Commit 4d80703

Browse files
author
George Khoury
authored
Merge pull request #68 from jordanopensource/development
Merge 'development' into 'main
2 parents 35aa0c3 + 9c04921 commit 4d80703

File tree

81 files changed

+4826
-323
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

81 files changed

+4826
-323
lines changed

.dockerignore

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Git
2+
.git
3+
.gitignore
4+
.gitattributes
5+
.github
6+
7+
# Docker
8+
Dockerfile
9+
docker-compose.yaml
10+
docker-compose.yml
11+
.dockerignore
12+
13+
# Documentation
14+
*.md
15+
LICENSE
16+
17+
# macOS (optional)
18+
.DS_Store
19+
20+
# Visual Studio Code (optional)
21+
.vscode
22+
23+
# Drone
24+
.drone.yml
25+
26+
.env
27+
.env.*
28+
29+
# editot configs
30+
.eslintrc.*
31+
.prettierrc

.drone.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Drone CI File!
2+
3+
kind: pipeline
4+
type: kubernetes
5+
name: default
6+
7+
metadata:
8+
namespace: builds
9+
10+
node_selector:
11+
doks.digitalocean.com/node-pool: josa-cloud-np
12+
13+
steps:
14+
- name: build
15+
image: plugins/docker
16+
settings:
17+
repo: josaorg/contributions-web
18+
tags:
19+
- ${DRONE_COMMIT_SHA}
20+
- latest
21+
username:
22+
from_secret: docker_username
23+
password:
24+
from_secret: docker_password
25+
- name: notify
26+
image: plugins/slack
27+
settings:
28+
webhook:
29+
from_secret: slack_webhook
30+
channel: heartbeat
31+
depends_on:
32+
- build

.env.sample

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# endpoint for API
2+
CONTRIBUTIONS_API_URL=

.eslintrc.js

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,14 @@ module.exports = {
22
root: true,
33
env: {
44
browser: true,
5-
node: true
5+
node: true,
66
},
77
parserOptions: {
88
parser: '@babel/eslint-parser',
9-
requireConfigFile: false
9+
requireConfigFile: false,
1010
},
11-
extends: [
12-
'@nuxtjs',
13-
'plugin:nuxt/recommended',
14-
'prettier'
15-
],
16-
plugins: [
17-
],
11+
extends: ['@nuxtjs', 'plugin:nuxt/recommended', 'prettier'],
12+
plugins: [],
1813
// add your custom rules here
19-
rules: {}
14+
rules: {},
2015
}

.gitignore

Lines changed: 77 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
1-
# Created by .ignore support plugin (hsz.mobi)
2-
### Node template
31
# Logs
4-
/logs
2+
logs
53
*.log
64
npm-debug.log*
75
yarn-debug.log*
86
yarn-error.log*
7+
lerna-debug.log*
8+
.pnpm-debug.log*
9+
10+
# Diagnostic reports (https://nodejs.org/api/report.html)
11+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
912

1013
# Runtime data
1114
pids
@@ -18,11 +21,12 @@ lib-cov
1821

1922
# Coverage directory used by tools like istanbul
2023
coverage
24+
*.lcov
2125

2226
# nyc test coverage
2327
.nyc_output
2428

25-
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
29+
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
2630
.grunt
2731

2832
# Bower dependency directory (https://bower.io/)
@@ -38,15 +42,27 @@ build/Release
3842
node_modules/
3943
jspm_packages/
4044

41-
# TypeScript v1 declaration files
42-
typings/
45+
# Snowpack dependency directory (https://snowpack.dev/)
46+
web_modules/
47+
48+
# TypeScript cache
49+
*.tsbuildinfo
4350

4451
# Optional npm cache directory
4552
.npm
4653

4754
# Optional eslint cache
4855
.eslintcache
4956

57+
# Optional stylelint cache
58+
.stylelintcache
59+
60+
# Microbundle cache
61+
.rpt2_cache/
62+
.rts2_cache_cjs/
63+
.rts2_cache_es/
64+
.rts2_cache_umd/
65+
5066
# Optional REPL history
5167
.node_repl_history
5268

@@ -56,35 +72,73 @@ typings/
5672
# Yarn Integrity file
5773
.yarn-integrity
5874

59-
# dotenv environment variables file
75+
# dotenv environment variable files
6076
.env
77+
.env.*
78+
!.env.sample
6179

6280
# parcel-bundler cache (https://parceljs.org/)
6381
.cache
82+
.parcel-cache
6483

65-
# next.js build output
84+
# Next.js build output
6685
.next
86+
out
6787

68-
# nuxt.js build output
88+
# Nuxt.js build / generate output
6989
.nuxt
70-
71-
# Nuxt generate
90+
.output
7291
dist
7392

93+
# Gatsby files
94+
.cache/
95+
# Comment in the public line in if your project uses Gatsby and not Next.js
96+
# https://nextjs.org/blog/next-9-1#public-directory-support
97+
# public
98+
7499
# vuepress build output
75100
.vuepress/dist
76101

77-
# Serverless directories
78-
.serverless
79-
80-
# IDE / Editor
81-
.idea
82-
83-
# Service worker
84-
sw.*
102+
# vuepress v2.x temp and cache directory
103+
.temp
104+
.cache
85105

86-
# macOS
87-
.DS_Store
106+
# Docusaurus cache and generated files
107+
.docusaurus
88108

89-
# Vim swap files
90-
*.swp
109+
# Serverless directories
110+
.serverless/
111+
112+
# FuseBox cache
113+
.fusebox/
114+
115+
# DynamoDB Local files
116+
.dynamodb/
117+
118+
# TernJS port file
119+
.tern-port
120+
121+
# Stores VSCode versions used for testing VSCode extensions
122+
.vscode-test
123+
.vscode
124+
.vscode/*
125+
126+
# yarn v2
127+
.yarn/cache
128+
.yarn/unplugged
129+
.yarn/build-state.yml
130+
.yarn/install-state.gz
131+
.pnp.*
132+
133+
# IDEs and editors
134+
/.idea
135+
.project
136+
.classpath
137+
.c9/
138+
*.launch
139+
.settings/
140+
*.sublime-workspace
141+
142+
# Other
143+
assets/data
144+
**.adminjs

Dockerfile

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
ARG CONTRIBUTIONS_API_URL=https://contributions.api.dev.josa.ngo HOST=0.0.0.0 PORT=3000 USER=node
2+
3+
###########
4+
# BUILDER #
5+
###########
6+
FROM node:16-alpine3.14 as builder
7+
8+
ARG CONTRIBUTIONS_API_URL
9+
ARG HOST
10+
ARG PORT
11+
12+
# copy build context and install dependencies
13+
WORKDIR /workspace
14+
COPY . .
15+
RUN npm install
16+
17+
# Inject the enviromental variables
18+
ENV CONTRIBUTIONS_API_URL=${CONTRIBUTIONS_API_URL} HOST=${HOST} PORT=${PORT}
19+
20+
# build NuxtJS project
21+
RUN npm run build:modern
22+
23+
###########
24+
# PROJECT #
25+
###########
26+
FROM node:16-slim
27+
28+
ARG CONTRIBUTIONS_API_URL
29+
ARG HOST
30+
ARG PORT
31+
ARG USER
32+
33+
# copy builder output to project workdir
34+
WORKDIR /app
35+
COPY --from=builder --chown=${USER}:${USER} /workspace/.nuxt /app/.nuxt
36+
COPY --from=builder --chown=${USER}:${USER} /workspace/nuxt.config.js /app/nuxt.config.js
37+
COPY --from=builder --chown=${USER}:${USER} /workspace/node_modules /app/node_modules
38+
COPY --from=builder --chown=${USER}:${USER} /workspace/package.json /app/
39+
40+
# Inject the enviromental variables
41+
ENV CONTRIBUTIONS_API_URL=${CONTRIBUTIONS_API_URL} HOST=${HOST} PORT=${PORT}
42+
43+
# set user context
44+
USER ${USER}
45+
46+
# expose port
47+
EXPOSE ${PORT}
48+
49+
# run for production
50+
CMD [ "npm", "run", "start:modern"]

README.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
</a>
77

88
<h3 align="center">top-contributors-web</h3>
9-
109
<p align="center">
1110
The web client for the Jordan Top Contributors website.
1211
<br />
@@ -20,9 +19,6 @@
2019
<a href="https://github.com/jordanopensource/top-contributors-web/issues">Request Feature</a>
2120
</p>
2221
</p>
23-
24-
25-
2622
<!-- TABLE OF CONTENTS -->
2723
<details open="open">
2824
<summary><h2 style="display: inline-block">Table of Contents</h2></summary>
@@ -143,4 +139,4 @@ Distributed under the Apache License. See `LICENSE` for more information.
143139

144140
Jordan Open Source Association - [@jo_osa](https://twitter.com/@jo_osa) - [email protected]
145141

146-
Project Link: [https://github.com/jordanopensource/top-contributors-web](https://github.com/jordanopensource/top-contributors-web)
142+
Project Link: [https://github.com/jordanopensource/top-contributors-web](https://github.com/jordanopensource/top-contributors-web)
35.5 KB
Binary file not shown.
34.8 KB
Binary file not shown.
34.9 KB
Binary file not shown.

0 commit comments

Comments
 (0)