-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat!: start move to total nextjs frontend/backend
- Loading branch information
1 parent
f30eca1
commit decdc35
Showing
363 changed files
with
4,494 additions
and
25,945 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
Dockerfile | ||
.dockerignore | ||
node_modules | ||
npm-debug.log | ||
README.md | ||
.next | ||
.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
DATABASE_URL="mysql://root:prisma@mysql:3306/database" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
const { resolve } = require('node:path'); | ||
|
||
const project = resolve(process.cwd(), 'tsconfig.json'); | ||
|
||
/** @type {import("eslint").Linter.Config} */ | ||
module.exports = { | ||
root: true, | ||
parser: '@typescript-eslint/parser', | ||
rules: { | ||
'turbo/no-undeclared-env-vars': 'off', | ||
}, | ||
parserOptions: { | ||
project: true, | ||
}, | ||
extends: [ | ||
'eslint:recommended', | ||
'prettier', | ||
require.resolve('@vercel/style-guide/eslint/next'), | ||
], | ||
globals: { | ||
React: true, | ||
JSX: true, | ||
}, | ||
env: { | ||
node: true, | ||
browser: true, | ||
}, | ||
plugins: ['only-warn'], | ||
settings: { | ||
'import/resolver': { | ||
typescript: { | ||
project, | ||
}, | ||
}, | ||
}, | ||
ignorePatterns: [ | ||
// Ignore dotfiles | ||
'.*.js', | ||
'node_modules/', | ||
], | ||
overrides: [{ files: ['*.js?(x)', '*.ts?(x)'] }], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: Push | ||
on: | ||
- push | ||
|
||
jobs: | ||
build-and-push-container-image: | ||
runs-on: ubuntu-20.04 | ||
env: | ||
REGISTRY: ghcr.io | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set environment variables | ||
run: | | ||
echo "IMAGE_NAME=$(echo "$REGISTRY/$GITHUB_REPOSITORY" | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV | ||
echo "GIT_SHA=$(echo ${{ github.sha }} | cut -c1-7)" >> $GITHUB_ENV | ||
if [[ "${{ github.ref }}" == "refs/heads/"* ]]; then | ||
GIT_REF=$(echo "${{ github.ref }}" | cut -d/ -f3) | ||
else | ||
GIT_REF=$(echo "${{ github.ref }}" | cut -d/ -f3) | ||
fi | ||
echo "GIT_REF=${GIT_REF}" >> $GITHUB_ENV | ||
echo "IMAGE_TAG=${GIT_REF}-${GIT_SHA}" >> $GITHUB_ENV | ||
- name: Docker Build | ||
run: docker build --tag ${IMAGE_NAME}:${IMAGE_TAG} . | ||
|
||
- name: Docker Login | ||
run: echo ${{ secrets.GITHUB_TOKEN }} | docker login $REGISTRY -u "${{ github.actor }}" --password-stdin | ||
|
||
- name: Docker Push (Tagged) | ||
run: docker push ${IMAGE_NAME}:${IMAGE_TAG} | ||
|
||
- name: Tag image as latest | ||
run: docker tag ${IMAGE_NAME}:${IMAGE_TAG} ${IMAGE_NAME}:latest | ||
|
||
- name: Docker Push (Latest) | ||
run: docker push ${IMAGE_NAME}:latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
stages: | ||
- build | ||
- push | ||
|
||
image: docker:dind | ||
|
||
before_script: | ||
- echo $CI_JOB_TOKEN | docker login -u gitlab-ci-token --password-stdin $CI_REGISTRY | ||
|
||
services: | ||
- name: docker:dind | ||
alias: docker | ||
command: ['--tls=false'] | ||
|
||
variables: | ||
DOCKER_DRIVER: overlay2 | ||
DOCKER_HOST: tcp://docker:2375/ | ||
DOCKER_TLS_CERTDIR: '' | ||
|
||
Build: | ||
stage: build | ||
except: | ||
variables: | ||
- $DOCKER_NO_CACHE | ||
script: | ||
- docker pull $CI_REGISTRY_IMAGE:latest || true | ||
- docker build --cache-from $CI_REGISTRY_IMAGE:latest --tag $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA . | ||
- docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA | ||
|
||
Push latest: | ||
variables: | ||
GIT_STRATEGY: none | ||
stage: push | ||
only: | ||
- master | ||
script: | ||
- docker pull $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA | ||
- docker tag $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA $CI_REGISTRY_IMAGE:latest | ||
- docker push $CI_REGISTRY_IMAGE:latest | ||
|
||
Push tag: | ||
variables: | ||
GIT_STRATEGY: none | ||
stage: push | ||
only: | ||
- tags | ||
script: | ||
- docker pull $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA | ||
- docker tag $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME | ||
- docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# Commonly ignored Node.js files | ||
node_modules | ||
npm-debug.log | ||
.npm | ||
|
||
# Next.js Build Output | ||
.next | ||
build | ||
|
||
# Next.js Generated Files | ||
public/static/documents | ||
|
||
# Jest | ||
coverage | ||
.swc | ||
junit.xml | ||
|
||
# Storybook | ||
storybook-static | ||
build-storybook.log | ||
.nyc_output | ||
|
||
# Vercel Files | ||
.vercel | ||
.turbo | ||
cache | ||
|
||
# Cache Files | ||
.eslintjscache | ||
.eslintmdcache | ||
.stylelintcache | ||
.prettiercache | ||
|
||
# TypeScript | ||
tsconfig.tsbuildinfo | ||
|
||
# Metadata Files | ||
CODEOWNERS | ||
|
||
# Prettier's Handlebar parser is limited and chokes on some syntax features | ||
# https://github.com/prettier/prettier/issues/11834 | ||
scripts/release-post/template.hbs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"tabWidth": 2, | ||
"useTabs": false, | ||
"semi": true, | ||
"singleQuote": true, | ||
"jsxSingleQuote": false, | ||
"trailingComma": "es5", | ||
"bracketSpacing": true, | ||
"bracketSameLine": false, | ||
"arrowParens": "avoid" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
FROM node:iron | ||
RUN npm install -g pnpm | ||
WORKDIR /usr/src/app | ||
RUN ls | ||
SHELL ["/bin/bash", "--login", "-c"] | ||
ENV SHELL bash | ||
COPY . . | ||
RUN mkdir -p /.cache/pnpm/dlx | ||
RUN chmod 777 /.cache/pnpm/dlx/ -R | ||
RUN mkdir -p /usr/src/app/.next/cache/fetch-cache | ||
RUN chmod 777 /usr/src/app/.next/cache -R | ||
RUN chmod 777 /usr/src/app -R | ||
RUN chmod 744 ./prisma/schema.prisma | ||
RUN pnpm install | ||
RUN pnpm dlx prisma generate | ||
RUN pnpm build | ||
CMD ["pnpm", "start"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
FROM node:iron | ||
RUN npm install -g pnpm | ||
COPY . /usr/src/app | ||
WORKDIR /usr/src/app | ||
SHELL ["/bin/bash", "--login", "-c"] | ||
ENV SHELL bash | ||
# RUN chmod 777 /usr/src/app -R | ||
RUN chmod 744 ./prisma/schema.prisma | ||
RUN pnpm install | ||
RUN pnpm dlx prisma generate | ||
CMD ["pnpm", "dev"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
# Medialog | ||
# Medialog Frontend | ||
|
||
A self hosted solution for privately rating and reviewing different sorts of media | ||
## Run | ||
|
||
## Frontend and Backend instructions exist in their respective directories | ||
`pnpm install` | ||
`pnpm dev` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import React from 'react'; | ||
|
||
const Page = () => { | ||
return <div>Page</div>; | ||
}; | ||
|
||
export default Page; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import Sidebar from '@/components/sidebar'; | ||
import React, { ReactNode } from 'react'; | ||
|
||
const Layout = ({ children }: { children: ReactNode }) => { | ||
return ( | ||
<html lang="en"> | ||
<body | ||
className={`grid grid-cols-1 grid-rows-[70px,1fr] lg:grid-rows-1 lg:grid-cols-[256px,1fr] min-h-[100dvh]`} | ||
> | ||
<Sidebar /> | ||
{children} | ||
</body> | ||
</html> | ||
); | ||
}; | ||
|
||
export default Layout; |
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import React from 'react'; | ||
|
||
const Page = () => { | ||
return <div className="font-bold text-xl">Test</div>; | ||
}; | ||
|
||
export default Page; |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.