Skip to content

Latest commit

 

History

History
117 lines (84 loc) · 2.41 KB

README.md

File metadata and controls

117 lines (84 loc) · 2.41 KB

Ecosystem

Root Commands

# At root dir
cd frourio-template-railway-tailwind

Setup .env

# With makefile
make env-setup-local

Run the app

# Let's run DB containers to begin with
docker-compose up -d

# Run npm install for all the directories
make install

# Run dev server for both frontend & backend
npm run dev

Use Supabase At Local Environment

# move directory to frontend
cd frontend-web

# initialize supabase cofiguration
npx supabase init

# Let's staet Supabase
npx supabase start

After a moment, local keys and configurations will be generated.

Create fields for "NEXT_PUBLIC_SUPABASE_URL" and "NEXT_PUBLIC_SUPABASE_ANON_KEY" in your .env.local file, and set their values to the "API URL" and "anon key", respectively.

Access the Studio URL for initial setup.

1)Navigate to the Storage section and create a new bucket.

2)Go to the Policies section under Storage and create your storage policies (make sure to pay attention to the bucket name, folder name, and allowed file extensions, as they are case-sensitive).

Finally, call the API to perform actual uploads and other operations.

Enter ECS tasks in the Staging environment via SSM Session Manager

What you need

Reference.

$ cd frourio-template-railway-tailwind
$ sh . /scripts/ecs_exec_stg -t ((task-id)) # Example) . /scripts/ecs_exec_stg -t 941f8694308b4adea44cb07ff9e50c30

Deployment config

AWS Amplify(frontend)

version: 1
applications:
  - frontend:
      phases:
        preBuild:
          commands:
            - cd ../
            - npm install --prefix frontend-web
            - npm install --prefix backend-api
        build:
          commands:
            - cd frontend-web
            - npm run build
      artifacts:
        baseDirectory: .next
        files:
          - "**/*"
      cache:
        paths:
          - .next/cache/**/*
          - .npm/**/*
    appRoot: frontend-web