Skip to content

Commit

Permalink
Merge remote-tracking branch 'soundlab-client/master' from old https:…
Browse files Browse the repository at this point in the history
  • Loading branch information
ColeDCrawford committed Sep 6, 2022
2 parents 738b3e3 + c2d3b56 commit 82adc6a
Show file tree
Hide file tree
Showing 492 changed files with 56,483 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"env": {
"test": {
"plugins": ["babel-plugin-css-modules-transform"]
}
},
"plugins": [
"lodash",
"transform-class-properties",
["transform-object-rest-spread", { "useBuiltIns": true }]
],
"presets": ["es2015", "flow", "react"]
}
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
6 changes: 6 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
root = true

[*]
end_of_line = lf
indent_size = 2
indent_style = space
18 changes: 18 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
REACT_APP_GRAPHQL_SERVER=http://api.soundlab.orphe.us:3001
REACT_APP_GRAPHQL_URI=graphql
REACT_APP_SERVER=http://api.soundlab.orphe.us:3001
REACT_APP_LOGIN_URI=auth/login
REACT_APP_LOGOUT_URI=auth/logout
REACT_APP_REGISTER_URI=auth/register
REACT_APP_VERIFY_TOKEN_URI=auth/verify-token
REACT_APP_COOKIE_DOMAIN=soundlab.fas.harvard.edu
REACT_APP_CANONICAL_DOMAIN=soundlab.fas.harvard.edu
REACT_APP_BUCKET_URL=soundlab-archimedes001

REACT_APP_FACBOOK_CLIENT_ID=client_id
REACT_APP_GOOGLE_CLIENT_ID=client_id
REACT_APP_TWITTER_CLIENT_ID=client_id

REACT_APP_GOOGLE_MAPS_API_KEY=mapkey
REACT_APP_WORDPRESS_UPLOADS_URL=http://admin.soundlab.orphe.us/wp-content/uploads/
REACT_APP_ADMIN_URL=http://soundlab.fas.harvard.edu
Empty file added .env.development
Empty file.
Empty file added .env.production
Empty file.
4 changes: 4 additions & 0 deletions .esdoc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"source": "./server",
"destination": "./doc"
}
6 changes: 6 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
node_modules
build
docs
k8s
public
coverage
81 changes: 81 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
{
"env": {
"es6": true,
"browser": true,
"node": true
},
"extends": "react-app",
"parser": "babel-eslint",
"parserOptions": {
"allowImportExportEverywhere": true,
"ecmaVersion": 6,
"sourceType": "module",
"ecmaFeatures": {
"jsx": true
}
},
"rules": {
"indent": [
"error",
"tab"
],
"class-methods-use-this": "off",
"no-return-await": "off",
"consistent-return": "off",
"object-shorthand": "off",
"no-absolute-path": "off",
"no-param-reassign": "off",
"no-tabs": "off",
"no-underscore-dangle": "off",
"no-undef": "off",
"no-console": "off",
"no-unused-vars": "error",
"react/jsx-indent": [
"error",
"tab"
],
"react/jsx-indent-props": [
"error",
"tab"
],
"react/react-in-jsx-scope": "off",
"react/prefer-stateless-function": "off",
"react/jsx-no-undef": "off",
"react/jsx-no-bind": "off",
"react/sort-comp": "off",
"react/prop-types": "off",
"react/require-default-props": "off",
"react/forbid-prop-types": "off",
"react/no-array-index-key": "off",
"jsx-a11y/label-has-for": "off",
"jsx-a11y/no-static-element-interactions": "off",
"new-cap": "off",
"import/no-extraneous-dependencies": "off",
"object-curly-spacing": "off",
"no-multiple-empty-lines": "off",
"comma-dangle": "off",
"meteor/no-session": "off",
"no-trailing-spaces": "off",
"space-before-function-paren": "off",
"prefer-arrow-callback": "off",
"max-len": "off",
"jsx-a11y/anchor-has-content": "off",
"jsx-a11y/no-noninteractive-element-interactions": "off",
"react/no-unused-prop-types": "off",
"react/no-danger": "off",
"no-bitwise": "off",
"padded-blocks": "off",
"import/extensions": "off",
"react/prefer-es6-class": "off",
"no-prototype-builtins": "off",
"react/jsx-filename-extension": [1, { "extensions": [".js", ".jsx"] }]
},
"settings": {
"import/resolver": {
"node": {
"extensions": [".js", ".jsx"],
"moduleDirectory": ["node_modules", "./client/src"]
}
}
}
}
9 changes: 9 additions & 0 deletions .flowconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[ignore]
<PROJECT_ROOT>/client

[include]

[libs]

[options]
module.name_mapper='^\(.*\)$' -> '<PROJECT_ROOT>/client/src/\1'
20 changes: 20 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Automatically normalize line endings for all text-based files
# http://git-scm.com/docs/gitattributes#_end_of_line_conversion
* text=auto

# For the following file types, normalize line endings to LF on
# checkin and prevent conversion to CRLF when they are checked out
# (this is required in order to prevent newline related issues like,
# for example, after the build script is run)
.* text eol=lf
*.html text eol=lf
*.css text eol=lf
*.less text eol=lf
*.scss text eol=lf
*.sss text eol=lf
*.js text eol=lf
*.json text eol=lf
*.md text eol=lf
*.sh text eol=lf
*.txt text eol=lf
*.xml text eol=lf
42 changes: 42 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Application
node_modules
build
coverage
*.log
/**/*.css
dump.rdb

# Fonts
!public/css/materialdesignicons.css
!public/css/materialdesignicons.min.css

# Temp files
tmp/

# Editors
*~
\#*\#
/.emacs.desktop
/.emacs.desktop.lock
*.elc
auto-save-list
tramp
.\#*
*.sw[po]
.idea/
*.iml
*.iws
.vscode/

# OS
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
ehthumbs.db
Thumbs.db
.env*.local

doc/
.env
51 changes: 51 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
stages:
- containerize
- staging


variables:
# $GCP_PROJECT_NAME set in Gitlab settings;
# SHA for ID in deployment; branchName for convenience;
IMAGE_TAG: us.gcr.io/archimedes-01201/$GCP_PROJECT_NAME:$CI_COMMIT_SHA
IMAGE_TAG_BRANCH: us.gcr.io/archimedes-01201/$GCP_PROJECT_NAME:$CI_COMMIT_REF_SLUG
CONTAINER_NAME: $GCP_PROJECT_NAME
DEPLOYMENT_ID_STAGING: $GCP_PROJECT_NAME-staging
DEPLOYMENT_ID_PRODUCION: $GCP_PROJECT_NAME-production


docker-build:
stage: containerize
image: google/cloud-sdk:latest
services:
- docker:dind
only:
- master
- develop
before_script:
# auth to gcp
- echo $GCP_SERVICE_KEY > gcp-service-key.json
- gcloud auth activate-service-account --key-file gcp-service-key.json
script:
# containerize
- docker build -t $IMAGE_TAG -t $IMAGE_TAG_BRANCH . # Build docker image
# publish to private gcr
- gcloud docker -- push $IMAGE_TAG
- gcloud docker -- push $IMAGE_TAG_BRANCH


deploy-staging:
image: google/cloud-sdk:latest
services:
- docker:dind
only:
- master # staging
stage: staging
before_script:
# auth to gcp
- echo $GCP_SERVICE_KEY > gcp-service-key.json
- gcloud auth activate-service-account --key-file gcp-service-key.json
script:
# rolling upgrade container
- gcloud config set compute/zone us-east1-b
- gcloud container clusters get-credentials archimedes-cluster
- kubectl set image deployment/$DEPLOYMENT_ID_STAGING $CONTAINER_NAME=us.gcr.io/archimedes-01201/$GCP_PROJECT_NAME:$CI_COMMIT_SHA
20 changes: 20 additions & 0 deletions .jsdoc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"plugins": [],
"recurseDepth": 10,
"source": {
"includePattern": ".+\\.js(doc|x)?$",
"excludePattern": "(^|\\/|\\\\)_",
"exclude": [
"node_modules"
]
},
"sourceType": "module",
"tags": {
"allowUnknownTags": true,
"dictionaries": ["jsdoc","closure"]
},
"templates": {
"cleverLinks": false,
"monospaceLinks": false
}
}
17 changes: 17 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# build environment
FROM node:9.6.1 as builder
# set working directory
RUN mkdir /app
COPY . /app/.
WORKDIR /app
# install and cache app dependencies
RUN yarn
# build
RUN yarn build


# production environment
FROM nginx:1.13.9-alpine
COPY --from=builder /app/build /usr/share/nginx/html
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]
Loading

0 comments on commit 82adc6a

Please sign in to comment.