Skip to content

Commit

Permalink
First version (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jérôme Pogeant authored Sep 24, 2020
1 parent 1b5df05 commit cc73741
Show file tree
Hide file tree
Showing 45 changed files with 9,140 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
root = true

[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
indent_style = space

[*.js]
indent_size = 2

[*.svelte]
indent_size = 2
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
svelte.config.js
.eslint.js
30 changes: 30 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
module.exports = {
parserOptions: {
ecmaVersion: 2019,
sourceType: 'module',
},
env: {
es6: true,
browser: true,
},
plugins: ['svelte3'],
overrides: [
{
files: ['*.svelte'],
processor: 'svelte3/svelte3',
},
],
extends: ['airbnb', 'prettier'],
rules: {
'import/no-extraneous-dependencies': [
'error',
{
devDependencies: true,
},
],
'import/first': 'off',
'import/export': 'off',
'import/no-mutable-exports': 'off',
'import/prefer-default-export': 'off',
},
};
13 changes: 13 additions & 0 deletions .github/workflows/code-quality.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Code Quality

on: ['push']

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Check eslint
run: |
npm i
npm run lint
34 changes: 34 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Deployment

on:
push:
tags:
- '*'

jobs:
deployment:
runs-on: ubuntu-latest
name: Deployment
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Push Docker Hub
uses: docker/build-push-action@v1
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
repository: lillegophers/lille-gophers-website
tags: latest
tag_with_ref: true
push: ${{ startsWith(github.ref, 'refs/tags/') }}
- name: Deploy on Digital Ocean
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.DIGITALOCEAN_HOST }}
USERNAME: ${{ secrets.DIGITALOCEAN_USERNAME }}
KEY: ${{ secrets.SSH_KEY }}
script: |
docker-compose stop lille-gophers
docker-compose rm lille-gophers
docker-compose pull
docker-compose up -d
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/docker-compose.override.yml
/node_modules/
/public/build/
.eslintcache
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
public/build
package*.json
7 changes: 7 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"printWidth": 120,
"singleQuote": true,
"quoteProps": "consistent",
"jsxSingleQuote": true,
"svelteStrictMode": true
}
1 change: 1 addition & 0 deletions CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @Jerome1337 @Thyrael
9 changes: 9 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
FROM node:current AS build
WORKDIR /build
COPY . .
RUN npm i
RUN npm run build

FROM nginx:alpine
WORKDIR /usr/share/nginx/html
COPY --from=build /build/public .
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
init:
cp docker-compose.override.yml.dist docker-compose.override.yml

coding-style:
npm run lint:fix
npm run prettier
6 changes: 6 additions & 0 deletions docker-compose.override.yml.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version: '3.8'

services:
front:
ports:
- 7000:5000
10 changes: 10 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: '3.8'

services:
front:
container_name: 'lille-gophers-website'
image: node:alpine
volumes:
- '.:/app'
working_dir: /app
entrypoint: ['./entrypoint.sh', 'npm', 'run', 'dev']
5 changes: 5 additions & 0 deletions entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/sh

npm install

exec "$@"
Loading

0 comments on commit cc73741

Please sign in to comment.