-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add deploy buttons and clean environment variables (#974)
* add render.yaml * Clean environment variables --------- Co-authored-by: Charles Bochet <[email protected]>
- Loading branch information
1 parent
a90cbac
commit b028d9f
Showing
31 changed files
with
194 additions
and
112 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
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
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,7 +1,7 @@ | ||
--- | ||
sidebar_position: 0 | ||
sidebar_custom_props: | ||
icon: TbArrowBigRight | ||
icon: TbDeviceDesktop | ||
--- | ||
|
||
# Local Setup | ||
|
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 |
---|---|---|
|
@@ -4,6 +4,6 @@ sidebar_custom_props: | |
icon: TbTerminal2 | ||
--- | ||
|
||
# CLI (soon) | ||
# CLI | ||
|
||
Available soon! |
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,5 +1,6 @@ | ||
REACT_APP_API_URL=http://localhost:3000/graphql | ||
REACT_APP_AUTH_URL=http://localhost:3000/auth | ||
REACT_APP_FILES_URL=http://localhost:3000/files | ||
REACT_APP_SERVER_BASE_URL=http://localhost:3000 | ||
|
||
CHROMATIC_PROJECT_TOKEN=REPLACE_ME | ||
# ———————— Optional ———————— | ||
# REACT_APP_SERVER_AUTH_URL=http://localhost:3000/auth | ||
# REACT_APP_SERVER_FILES_URL=http://localhost:3000/files | ||
# CHROMATIC_PROJECT_TOKEN= |
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
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
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 |
---|---|---|
|
@@ -6,7 +6,7 @@ import { useRecoilState, useRecoilValue } from 'recoil'; | |
import * as Yup from 'yup'; | ||
|
||
import { authProvidersState } from '@/client-config/states/authProvidersState'; | ||
import { isDemoModeState } from '@/client-config/states/isDemoModeState'; | ||
import { isSignInPrefilledState } from '@/client-config/states/isSignInPrefilledState'; | ||
import { AppPath } from '@/types/AppPath'; | ||
import { PageHotkeyScope } from '@/types/PageHotkeyScope'; | ||
import { useSnackBar } from '@/ui/snack-bar/hooks/useSnackBar'; | ||
|
@@ -45,7 +45,7 @@ export function useSignInUp() { | |
const { enqueueSnackBar } = useSnackBar(); | ||
const isMatchingLocation = useIsMatchingLocation(); | ||
const [authProviders] = useRecoilState(authProvidersState); | ||
const isDemoMode = useRecoilValue(isDemoModeState); | ||
const isSignInPrefilled = useRecoilValue(isSignInPrefilledState); | ||
const workspaceInviteHash = useParams().workspaceInviteHash; | ||
const [signInUpStep, setSignInUpStep] = useState<SignInUpStep>( | ||
SignInUpStep.Init, | ||
|
@@ -61,8 +61,8 @@ export function useSignInUp() { | |
mode: 'onChange', | ||
defaultValues: { | ||
exist: false, | ||
email: isDemoMode ? '[email protected]' : '', | ||
password: isDemoMode ? 'Applecar2025' : '', | ||
email: isSignInPrefilled ? '[email protected]' : '', | ||
password: isSignInPrefilled ? 'Applecar2025' : '', | ||
}, | ||
resolver: yupResolver(validationSchema), | ||
}); | ||
|
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
This file was deleted.
Oops, something went wrong.
6 changes: 6 additions & 0 deletions
6
front/src/modules/client-config/states/isSignInPrefilledState.ts
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,6 @@ | ||
import { atom } from 'recoil'; | ||
|
||
export const isSignInPrefilledState = atom<boolean>({ | ||
key: 'isSignInPrefilledState', | ||
default: false, | ||
}); |
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
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,6 @@ | ||
import { ApolloClient, InMemoryCache } from '@apollo/client'; | ||
|
||
export const mockedClient = new ApolloClient({ | ||
uri: process.env.REACT_APP_API_URL, | ||
uri: process.env.REACT_APP_SERVER_BASE_URL + '/graphql', | ||
cache: new InMemoryCache(), | ||
}); |
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,42 @@ | ||
services: | ||
- type: web | ||
name: front | ||
env: docker | ||
dockerfilePath: ./infra/prod/front/Dockerfile | ||
autoDeploy: false | ||
envVars: | ||
- key: REACT_APP_SERVER_BASE_URL | ||
fromService: | ||
name: server | ||
type: web | ||
envVarKey: RENDER_EXTERNAL_URL | ||
- type: web | ||
name: server | ||
env: docker | ||
dockerfilePath: ./infra/prod/server/Dockerfile | ||
dockerCommand: "sh -c yarn prisma:migrate && node dist/src/main" | ||
autoDeploy: false | ||
envVars: | ||
- key: ACCESS_TOKEN_SECRET | ||
generateValue: true | ||
- key: LOGIN_TOKEN_SECRET | ||
generateValue: true | ||
- key: REFRESH_TOKEN_SECRET | ||
generateValue: true | ||
- key: PG_DATABASE_URL | ||
fromDatabase: | ||
name: twenty-db | ||
property: connectionString | ||
- key: FRONT_BASE_URL | ||
fromService: | ||
name: front | ||
type: web | ||
envVarKey: RENDER_EXTERNAL_URL | ||
disk: | ||
name: twenty-disk | ||
mountPath: /.local-storage | ||
sizeGB: 5 | ||
|
||
databases: | ||
- name: twenty-db | ||
plan: starter |
Oops, something went wrong.