This repository has been archived by the owner on Jul 21, 2024. It is now read-only.
-
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.
Merge pull request #20 from clementvtrd/feat/google-oauth
feat: google oauth
- Loading branch information
Showing
35 changed files
with
697 additions
and
148 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,37 @@ | ||
--- | ||
on: | ||
push: | ||
branches-ignore: | ||
- main | ||
tags-ignore: | ||
- v* | ||
|
||
jobs: | ||
ci-cd: | ||
name: CI/CD | ||
|
||
runs-on: ubuntu-latest | ||
|
||
env: | ||
COMPOSE_FILE: docker-compose.test.yaml | ||
|
||
steps: | ||
- name: Install Task | ||
uses: arduino/setup-task@v1 | ||
with: | ||
version: 3.x | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- uses: actions/checkout@v4 | ||
|
||
- name: Initialize environment | ||
run: task init-env | ||
|
||
- name: Build images | ||
run: task docker-build | ||
|
||
- name: lint | ||
run: docker compose run --no-deps --rm app npm run lint | ||
|
||
- name: Types checking | ||
run: docker compose run --no-deps --rm app npm run type-check |
This file was deleted.
Oops, something went wrong.
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,3 @@ | ||
# Taskfile | ||
|
||
/.task |
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,2 +1,64 @@ | ||
[![.github/workflows/test.yaml](https://github.com/clementvtrd/nextjs-fullstack/actions/workflows/test.yaml/badge.svg?branch=main)](https://github.com/clementvtrd/nextjs-fullstack/actions/workflows/test.yaml) | ||
|
||
# NextJS Fullstack | ||
|
||
## Installation | ||
|
||
> This project was built around Docker version 25.0 and Docker Compose plugin version 2.27. | ||
### Taskfile | ||
|
||
A `Taskfile.yml`is present at the root of the repository which containers the common commands to bootstrap the project. Subfiles stands in the directory `tasks` and are imported at the beginning of the main file. | ||
|
||
You can install the `task` CLI through their website at [taskfile.dev/installation](https://taskfile.dev/installation/). | ||
|
||
### Boostrap | ||
|
||
To bootstrap the project, first run the `init` command: | ||
|
||
```sh | ||
task init | ||
``` | ||
|
||
This will copy the default .env, build images and install NodeJS dependencies. | ||
|
||
You needs to update the [.env.local](./app/.env.local) with the following information: | ||
|
||
- `AUTH_SECRET` can be generate with this command: | ||
|
||
```sh | ||
docker compose run --rm --no-deps app npx auth secret | ||
``` | ||
|
||
- `AUTH_GOOGLE_ID` and `AUTH_GOOGLE_SECRET` are available in [Google Cloud Platform](https://console.cloud.google.com) under APIs & Services > Credentials. As of writing those lines, only two possibility remains : | ||
|
||
1. use the `KNP Hot Tools (localhost)` for development purpose only ; | ||
2. use the `KNP Hot Tools (prod)` for production server under knpnet.net domain ; | ||
|
||
- `AUTH_GOOGLE_RESTRICT_DOMAIN` might be blank during development, so you can loggin with any Google account or with `@knplabs.com` to restrict Google account from KNP Labs. | ||
|
||
### Starting containers | ||
|
||
Simply run: | ||
|
||
```sh | ||
task start | ||
``` | ||
|
||
## Adminer | ||
|
||
You can start Adminer with the following command: | ||
|
||
```sh | ||
docker compose --profile adminer up -d adminer | ||
``` | ||
|
||
## Help | ||
|
||
You can si all available shortcuts defined with Taskfile with this command[^1]: | ||
|
||
```sh | ||
task --list | ||
``` | ||
|
||
[^1]: Only shortcuts with a description (`desc`) are displayed |
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 |
---|---|---|
@@ -1 +1,12 @@ | ||
BASE_URL=http://localhost:3000 | ||
BASE_URL="http://localhost:3000" | ||
|
||
## Prisma | ||
|
||
DATABASE_URL="postgresql://postgres:password@postgres:5432/app?schema=public" | ||
|
||
## Auth JS | ||
|
||
AUTH_SECRET= | ||
AUTH_GOOGLE_ID= | ||
AUTH_GOOGLE_SECRET= | ||
AUTH_GOOGLE_RESTRICT_DOMAIN= |
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 was deleted.
Oops, something went wrong.
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,6 +1,17 @@ | ||
/** @type {import('next').NextConfig} */ | ||
const nextConfig = { | ||
output: "standalone" | ||
output: "standalone", | ||
transpilePackages: [ | ||
"lucide-react", | ||
], | ||
images: { | ||
remotePatterns: [ | ||
{ | ||
hostname: '*.googleusercontent.com', | ||
protocol: 'https', | ||
} | ||
] | ||
} | ||
}; | ||
|
||
export default nextConfig; |
Oops, something went wrong.