Skip to content
This repository has been archived by the owner on Jul 31, 2023. It is now read-only.

Setting up a local dev environment #32

Closed
Yinnerston opened this issue Jun 20, 2023 · 2 comments
Closed

Setting up a local dev environment #32

Yinnerston opened this issue Jun 20, 2023 · 2 comments
Assignees
Labels
documentation Improvements or additions to documentation enhancement New feature or request

Comments

@Yinnerston
Copy link
Owner

Yinnerston commented Jun 20, 2023

Local dev environments

https://memefeed.atlassian.net/browse/TSR-63?atlOrigin=eyJpIjoiMzUxYmVkMDA0ODg1NGRlZjk5MmU0MjVmNTA5NGI1YTUiLCJwIjoiaiJ9

Hi everybody.
When I opened this week's Sentry report, I noticed many Invalid HTTP_HOST header from Django CORSMiddleware. I realised that we need to create a separate development and production environment, probably using different domains?

sentry report

Does anybody else have experience implementing this?

Proposed solution

  • Create env variable in the frontend container for DEPLOYMENT_ENV={DEV or PRODUCTION}
  • The production environment will have the wocchit.com url, meanwhile the dev environment can use localhost url to your dev machine that you specify yourself?

Why use this solution?

  • Keeps the development on a local computer using a single docker-compose.yml file
  • I don't have to pay for cloud costs and I own the data in Teaser when I can keep the production deployment on a machine I own (disregarding bunny.net).

Gonna do some research on if this is the correct way of implementing this. Would love to hear your opinions on this implementation.

@Yinnerston Yinnerston added documentation Improvements or additions to documentation enhancement New feature or request labels Jun 20, 2023
@Yinnerston Yinnerston self-assigned this Jun 21, 2023
@Yinnerston
Copy link
Owner Author

Blocks #29

@Yinnerston
Copy link
Owner Author

Yinnerston commented Jul 5, 2023

See #34 https://yinnerston.github.io/Teaser/docs/getting-started/setup/#production-setup

  • If you are forking this repository and hosting Teaser on your own production domain, change all mentions of wocchit.com to your domain.
    • For your dev environment, you can replace wocchit.com with the IP of the computer that is hosting the backend server. You need to rebuild the frontend into an apk using the command npx eas build --platform android --profile development in the frontend container

@Yinnerston Yinnerston pinned this issue Jul 5, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant