diff --git a/.env.sample b/.env.sample index ac0580a..77de7d5 100644 --- a/.env.sample +++ b/.env.sample @@ -5,4 +5,4 @@ SUPABASE_PASSWORD=postgres ## supabase default password SUPABASE_DBNAME=postgres ## supabase default dbname SUPABASE_DOCKER_NAME=supabase_db_connect-four-reboot-admin ## supabase default docker_name VITE_SUPABASE_URL= http://127.0.0.1:54321 ## supabase url for react admin dataprovider -VITE_SUPABASE_API_KEY= ## please put your supabase anon key \ No newline at end of file +VITE_SUPABASE_API_KEY= eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZW1vIiwicm9sZSI6ImFub24iLCJleHAiOjE5ODM4MTI5OTZ9.CRXP1A7WOeoJeXxjNni43kdQwgnWNReilDMblYTn_I0 ## please put your supabase anon key \ No newline at end of file diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 8dae7b1..508efc2 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -1,4 +1,4 @@ -name: Deploy to EC2 +name: Deploy to prod on: push: @@ -28,5 +28,5 @@ jobs: SUPABASE_ACCESS_TOKEN: ${{ secrets.SUPABASE_ACCESS_TOKEN }} SUPABASE_DB_URL: ${{ secrets.SUPABASE_DB_URL }} run: | - npx supabase link --project-ref dtdsoudleeheckhqyqsk + npx supabase link --project-ref $SUPABASE_PROJECT_REF npx tsx tools/populateDbWithFakeData.ts diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 103b1e9..b3e0df4 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,4 +1,4 @@ -name: CI +name: CI tests on: push: diff --git a/README.md b/README.md index 27e0606..0c9ac37 100644 --- a/README.md +++ b/README.md @@ -9,26 +9,27 @@ To run connect-four-reboot-admin, you have to run the both components. ## Run the connect-four-reboot-admin api (postrgrest) -Copy the .env.sample file to create your development environment file .env: if you use default configs, you just have to put your supabase anon key. - -Then run: +First install the app with : ```sh -make run +make install ``` -Supbase start with a populate, ready to use database. - -If you want go into details, you have several goals in the makefile related to supabase. Please see [the makefile](makefile). - -## Installation connect-four-reboot-admin frontend +Then, Copy the .env.sample file to create your development environment file .env: if you use default configs, you just have to put your supabase anon key. -Install the react-admin application dependencies by running: +Now run: ```sh -make install +make run ``` +This command will start both components: + +- Supbase with a populated, ready to use database +- react-admin front end vite server + +If you want go into details, you have several goals in the makefile related to supabase. Please see [the makefile](makefile). + ## Development connect-four-reboot-admin frontend Start the react-admin application in development mode by running: diff --git a/makefile b/makefile index bd5d391..533e8d4 100644 --- a/makefile +++ b/makefile @@ -25,7 +25,7 @@ run-ra-dev: ## run the react-admin server. ######## run: ## fresh run of all you need to use the app - make start-supabase && make supabase-migrate-database && make supabase-populate + make start-supabase && make supabase-migrate-database && make run-ra-dev stop: ## stop the docker make stop-supabase diff --git a/package.json b/package.json index 0b71556..e9df415 100644 --- a/package.json +++ b/package.json @@ -14,8 +14,7 @@ "type-check": "tsc --noEmit", "lint": "eslint --fix --ext .js,.jsx,.ts,.tsx ./src", "format": "prettier --write ./src", - "clear": "rm -rf node_modules", - "supabase:remote:init": "yes | npx supabase db reset --linked && yes | npx supabase db push --include-all" + "clear": "rm -rf node_modules" }, "dependencies": { "@emotion/react": "^11.14.0",