Skip to content

Commit e05cd62

Browse files
committed
First public commit
0 parents  commit e05cd62

File tree

228 files changed

+17717
-0
lines changed

Some content is hidden

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

228 files changed

+17717
-0
lines changed

.dockerignore

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
node_modules
2+
.env
3+
.sentryclirc
4+
sentry.properties

.eslintrc.json

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extends": "next/core-web-vitals"
3+
}

.github/workflows/ci.yml

+78
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
name: ci
2+
on:
3+
push:
4+
branches:
5+
- main
6+
- development
7+
8+
jobs:
9+
linting:
10+
name: Linting
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Check out repository code
14+
uses: actions/checkout@v2
15+
16+
- name: Setup node
17+
uses: actions/setup-node@v2
18+
with:
19+
node-version: 16
20+
cache: yarn
21+
22+
- name: Install dependencies
23+
run: yarn install --frozen-lockfile
24+
25+
- name: ESLint
26+
run: yarn lint
27+
28+
# Label of the container job
29+
integration-tests:
30+
name: Run tests
31+
# Containers must run in Linux based operating systems
32+
runs-on: ubuntu-latest
33+
34+
steps:
35+
# Downloads a copy of the code in your repository before running CI tests
36+
- name: Check out repository code
37+
uses: actions/checkout@v2
38+
39+
- name: Setup node
40+
uses: actions/setup-node@v2
41+
with:
42+
node-version: 16
43+
cache: yarn
44+
45+
- name: Set environment variables
46+
run: |
47+
echo "DATABASE_URL=postgresql://postgres:password@localhost:5432/db" >> $GITHUB_ENV
48+
49+
- name: Install dependencies
50+
run: yarn install --frozen-lockfile
51+
52+
- name: Run db
53+
run: |
54+
docker pull postgres:14.2
55+
docker run -d -p 5432:5432 -e POSTGRES_PASSWORD=password -e POSTGRES_DB=db postgres:14.2
56+
yarn wait-on --timeout 60000 tcp:localhost:5432
57+
58+
- name: Build
59+
run: yarn build
60+
61+
- name: Deploy migrations
62+
run: yarn prisma migrate deploy
63+
64+
- name: Install playwright dependencies
65+
run: yarn playwright install --with-deps chromium
66+
67+
- name: Launch app
68+
run: yarn start 2>&1 & # backgrounnd mode
69+
70+
- name: Run tests
71+
run: yarn test
72+
73+
- name: Upload artifact playwright-report
74+
if: ${{ success() || failure() }}
75+
uses: actions/upload-artifact@v2
76+
with:
77+
name: playwright-report
78+
path: ./playwright-report

.gitignore

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2+
3+
# dependencies
4+
/node_modules
5+
/.pnp
6+
.pnp.js
7+
8+
# testing
9+
/coverage
10+
11+
# next.js
12+
.next/
13+
/out/
14+
15+
# production
16+
/build
17+
18+
# misc
19+
.DS_Store
20+
*.pem
21+
22+
# debug
23+
npm-debug.log*
24+
yarn-debug.log*
25+
yarn-error.log*
26+
27+
# local env files
28+
.env
29+
.env.local
30+
.env.development.local
31+
.env.test.local
32+
.env.production.local
33+
34+
# vercel
35+
.vercel
36+
37+
# Sentry
38+
.sentryclirc
39+
40+
# playwright
41+
/playwright-report
42+
/test-results

.prettierrc

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"semi": true,
3+
"tabWidth": 2,
4+
"useTabs": false,
5+
"trailingComma": "all",
6+
"singleQuote": false,
7+
"arrowParens": "always"
8+
}

.vscode/settings.json

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"editor.codeActionsOnSave": {
3+
"source.fixAll": true
4+
},
5+
"typescript.tsdk": "node_modules/typescript/lib"
6+
}

Dockerfile

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
FROM node:alpine
2+
3+
RUN mkdir -p /usr/src/app
4+
ENV PORT 3000
5+
ARG DATABASE_URL
6+
ENV DATABASE_URL $DATABASE_URL
7+
8+
WORKDIR /usr/src/app
9+
10+
COPY package.json /usr/src/app
11+
COPY yarn.lock /usr/src/app
12+
COPY schema.prisma /usr/src/app
13+
14+
RUN yarn --production
15+
16+
COPY . /usr/src/app
17+
18+
RUN yarn build
19+
20+
EXPOSE 3000
21+
22+
CMD [ "yarn", "start" ]

0 commit comments

Comments
 (0)