{"id":26335981,"url":"https://github.com/lumakernel/frourio-sample-1","last_synced_at":"2026-05-02T22:39:54.216Z","repository":{"id":55044647,"uuid":"327263963","full_name":"LumaKernel/frourio-sample-1","owner":"LumaKernel","description":"Hints for deploying frourio app to production.","archived":false,"fork":false,"pushed_at":"2021-01-16T02:45:34.000Z","size":666,"stargazers_count":0,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-15T07:03:17.021Z","etag":null,"topics":["frourio","github-page","netlify","sample","typescript","vercel"],"latest_commit_sha":null,"homepage":"https://frourio-sample-1.lumakernel.vercel.app","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/LumaKernel.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-01-06T09:34:52.000Z","updated_at":"2021-01-16T02:44:31.000Z","dependencies_parsed_at":"2022-08-14T10:00:44.180Z","dependency_job_id":null,"html_url":"https://github.com/LumaKernel/frourio-sample-1","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LumaKernel%2Ffrourio-sample-1","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LumaKernel%2Ffrourio-sample-1/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LumaKernel%2Ffrourio-sample-1/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LumaKernel%2Ffrourio-sample-1/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LumaKernel","download_url":"https://codeload.github.com/LumaKernel/frourio-sample-1/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243809882,"owners_count":20351407,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["frourio","github-page","netlify","sample","typescript","vercel"],"created_at":"2025-03-16T01:16:04.996Z","updated_at":"2025-10-17T08:53:10.791Z","avatar_url":"https://github.com/LumaKernel.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# Badges\n\n- Test:\n  - Official: [![Test](https://github.com/LumaKernel/frourio-sample-1/workflows/Test/badge.svg)](https://github.com/LumaKernel/frourio-sample-1/actions?query=workflow%3A%22Test%22)\n  - shields.io: [![Test](https://img.shields.io/github/workflow/status/LumaKernel/frourio-sample-1/Test?label=test\u0026style=for-the-badge)](https://github.com/LumaKernel/frourio-sample-1/actions?query=workflow%3A%22Test%22)\n- Deploy Client to GitHub Pages:\n  - Official: [![Deploy client](https://github.com/LumaKernel/frourio-sample-1/workflows/Deploy%20client/badge.svg)](https://github.com/LumaKernel/frourio-sample-1/actions?query=workflow%3A%22Deploy+client%22)\n  - shields.io: [![Deploy client](https://img.shields.io/github/workflow/status/LumaKernel/frourio-sample-1/Deploy%20client?label=deploy%20client\u0026style=for-the-badge)](https://github.com/LumaKernel/frourio-sample-1/actions?query=workflow%3A%22Deploy+client%22)\n- Deploy Client to GCP Storage:\n  - Official: [![Deploy client to GCP Storage](https://github.com/LumaKernel/frourio-sample-1/workflows/Deploy%20client%20to%20GCP%20Storage/badge.svg)](https://github.com/LumaKernel/frourio-sample-1/actions?query=workflow%3A%22Deploy+client+to+GCP+Storage%22)\n  - shields.io: [![Deploy client to GCP Storage](https://img.shields.io/github/workflow/status/LumaKernel/frourio-sample-1/Deploy%20client%20to%20GCP%20Storage?label=deploy%20client%20to%20GCP%20Storage\u0026style=for-the-badge)](https://github.com/LumaKernel/frourio-sample-1/actions?query=workflow%3A%22Deploy+client+to+GCP+Storage%22)\n- Deploy API server with pm2 deploy:\n  - Official: [![Deploy server](https://github.com/LumaKernel/frourio-sample-1/workflows/Deploy%20server/badge.svg)](https://github.com/LumaKernel/frourio-sample-1/actions?query=workflow%3A%22Deploy+server%22)\n  - shields.io: [![Deploy server](https://img.shields.io/github/workflow/status/LumaKernel/frourio-sample-1/Deploy%20server?label=deploy%20server\u0026style=for-the-badge)](https://github.com/LumaKernel/frourio-sample-1/actions?query=workflow%3A%22Deploy+server%22)\n- Netlify:\n  - Official: [![Netlify Status](https://api.netlify.com/api/v1/badges/483e2ff2-41b3-41ff-9e27-708ac54abb33/deploy-status)](https://app.netlify.com/sites/fervent-carson-ea5bcd/deploys)\n  - shields.io: [![](https://img.shields.io/netlify/483e2ff2-41b3-41ff-9e27-708ac54abb33?style=for-the-badge)](https://app.netlify.com/sites/fervent-carson-ea5bcd/deploys)\n- Vercel ( GitHub Deployments by shields.io )\n  - Production: [![](https://img.shields.io/github/deployments/LumaKernel/frourio-sample-1/Production?label=Vercel%20Production\u0026style=for-the-badge)](https://github.com/LumaKernel/frourio-sample-1/deployments/activity_log?environment=Production)\n  - Preview: [![](https://img.shields.io/github/deployments/LumaKernel/frourio-sample-1/Preview?label=Vercel%20%20Preview\u0026style=for-the-badge)](https://github.com/LumaKernel/frourio-sample-1/deployments/activity_log?environment=Preview)\n  - Production backing lambda: [![](https://img.shields.io/github/deployments/LumaKernel/frourio-sample-1/Production%20%E2%80%93%20frourio-sample-1-lambda?label=Production%20%E2%80%93%20frourio-sample-1-lambda\u0026style=for-the-badge)](https://github.com/LumaKernel/frourio-sample-1/deployments/activity_log?environment=Production+%E2%80%93+frourio-sample-1-lambda)\n\n# Deployments\n\n## Client\n\n- GitHub Pages: https://lumakernel.github.io/frourio-sample-1\n- Vercel: https://frourio-sample-1.vercel.app/\n- Netlify: https://fervent-carson-ea5bcd.netlify.app/\n- GCP Cloud Storage + LB + Cloud CDN: https://www.frourio-sample-1.luma.place/\n\n- Use Lambda version for backend\n  - Vercel: https://frourio-sample-1-lambda.vercel.app/\n\n## Server\n\n- GCP VM and load balancer: https://api.frourio-sample-1.luma.place/\n- AWS Lambda (serverless): https://8d9g90gifk.execute-api.ap-northeast-1.amazonaws.com/\n\n# My personal goals\n\n- [x] Deploy server to GCE + GCP LB\n- [x] Use pm2 graceful start\n- [x] Deploy client to Cloud CDN + GCS\n- [x] Use fluent-logger\n- [ ] ~Deploy server to GAE~\n  - Some problems:\n    - Read-only. I can't use sqlite and write images.\n    - Fully controlled by App Engine. We should use single package.json or take workspace (by yarn workspace, lerna, or npm v7 or above workspace) strategy.\n      - We can use `preinstall` script for this purpose, but it does not look smart.\n\n# Deploy to GCE as an exmpale using pm2 deploy\n\nI'm using the setup script like this with Ubuntu20.04\n\n```\n#!/bin/bash\n\nsudo apt update\ncurl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash -\nsudo apt update\nsudo apt install -y git nodejs\n\nsudo mkdir -p /opt/apiserver\nsudo mkdir -p /srv/apiserver\nUSER=\"ci\"\nsudo chown \"$USER:$USER\" /opt/apiserver\nsudo chown \"$USER:$USER\" /srv/apiserver\n```\n\nAnd setting GitHub Actions secrets like this.\n\n```\nAPI_DEPLOY_HOST= host ip got from GCP console\nAPI_DEPLOY_KNOWN_HOSTS= run `ssh-keyscan -H $host` for above host\nAPI_DEPLOY_SSH_KEY= ssh private key that can access to above host registered by GCE metadata\nAPI_DEPLOY_USER=ci\n\nAPI_DATABASE_URL=file:/srv/apiserver/prod.db\nAPI_JWT_SECRET=supersecret\nAPI_BASE_PATH=/api\nAPI_ORIGIN=https://api.frourio-sample-1.luma.place\nAPI_USER_ID=myuser\nAPI_USER_PASS=mypass\nAPI_SERVER_PORT=8080\nAPI_USER_STATIC_DIR=/srv/apiserver/static\n\nAWS_REGION=ap-northeast-1\nAWS_LAMBDA_FUNCTION_NAME_SERVER=your lambda name 1\nAWS_LAMBDA_FUNCTION_NAME_MIGRATION=your lambda name 2\nAWS_ACCESS_KEY_ID= your akid\nAWS_SECRET_ACCESS_KEY= your secret\n\nGCP_BUCKET_BASE_PATH=\n```\n\n# Diff\n\n- `goal-1`: https://github.com/LumaKernel/frourio-sample-1/compare/0ec04c4de73cf5a9e040e6eae87a513592a8301d..goal-1\n\n# Information\n\nThis is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).\n\n## Getting Started\n\nFirst, run the development server:\n\n```bash\nnpm run dev\n# or\nyarn dev\n```\n\nOpen [http://localhost:3001](http://localhost:3001) with your browser to see the result.\n\nYou can start editing the page by modifying `pages/index.js`. The page auto-updates as you edit the file.\n\n## Learn More\n\nTo learn more about Next.js, take a look at the following resources:\n\n- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.\n- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.\n\nYou can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!\n\n## Deploy on Vercel\n\nThe easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/import?utm_medium=default-template\u0026filter=next.js\u0026utm_source=create-next-app\u0026utm_campaign=create-next-app-readme) from the creators of Next.js.\n\nCheck out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.\n\n## Deploy server on Lambda\n\nThis is example for constructing infrastructures.\n\n![frourio-sample-1-lambda](https://user-images.githubusercontent.com/29811106/104748125-b2b64c80-5794-11eb-97ca-8855e98bfd43.png)\n(Created by [Cloudcraft](https://www.cloudcraft.co/))\n\n# My personal notes about this, motsly about GCP (Japanese)\n\nI'm using this repo for my GCP playground.\n\n- https://scrapbox.io/lookmark/B:_Installing_the_Cloud_Logging_agent_on_a_single_VM_%C2%A0%7C%C2%A0_Google_Cloud\n- https://scrapbox.io/lookmark/B:_Google_Cloud_for_AWS_Professionals\n- https://scrapbox.io/lookmark/B:_Using_Google-managed_SSL_certificates_%C2%A0%7C%C2%A0_Load_Balancing_%C2%A0%7C%C2%A0_Google_Cloud\n- https://scrapbox.io/lookmark/B:_How_To_Host_a_Next.js_Static_Website_With_GCP_Cloud_Storage_%7C_by_Bhargav_Bachina_%7C_Bachina_Labs_%7C_Medium\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flumakernel%2Ffrourio-sample-1","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flumakernel%2Ffrourio-sample-1","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flumakernel%2Ffrourio-sample-1/lists"}