2021-07-06 15:51:40 +00:00
|
|
|
cp .env.example .env
|
|
|
|
sed -i -e '/REDIS_URL/ s/=.*/=redis:\/\/localhost:6379/' .env
|
|
|
|
sed -i -e '/POSTGRES_HOST/ s/=.*/=localhost/' .env
|
|
|
|
sed -i -e '/SMTP_ADDRESS/ s/=.*/=localhost/' .env
|
|
|
|
sed -i -e "/FRONTEND_URL/ s/=.*/=https:\/\/$CODESPACE_NAME-3000.githubpreview.dev/" .env
|
2021-07-14 13:10:24 +00:00
|
|
|
sed -i -e "/WEBPACKER_DEV_SERVER_PUBLIC/ s/=.*/=https:\/\/$CODESPACE_NAME-3035.githubpreview.dev/" .env
|
|
|
|
# uncomment the webpacker env variable
|
|
|
|
sed -i -e '/WEBPACKER_DEV_SERVER_PUBLIC/s/^# //' .env
|
2022-06-16 21:37:07 +00:00
|
|
|
# fix the error with webpacker
|
2022-06-17 13:42:56 +00:00
|
|
|
echo 'export NODE_OPTIONS=--openssl-legacy-provider' >> ~/.zshrc
|
2022-06-16 21:37:07 +00:00
|
|
|
|
|
|
|
# codespaces make the ports public
|
|
|
|
gh codespace ports visibility 3000:public 3035:public 8025:public -c $CODESPACE_NAME
|