Browse Source

fucking hardcoding all the base urls

master
Spencer Flagg 3 years ago
parent
commit
5be5280baa
4 changed files with 14 additions and 14 deletions
  1. +7
    -7
      fl-run.sh
  2. +2
    -2
      login/index.js
  3. +4
    -4
      nuxt.config.js
  4. +1
    -1
      plugins/env.js

+ 7
- 7
fl-run.sh View File

@ -1,17 +1,17 @@
echo -e "\r\n\r\n\e[44m *** Removing Code Directory *** \e[44m\r\n"
echo -e "\r\n\r\n\e[44m *** Removing Code Directory *** \e[0m\r\n"
rm -r /usr/src/flylocal-web
echo "\r\n\r\n\e[44m *** Making Code Directory *** \e[44m\r\n"
echo -e "\r\n\r\n\e[44m *** Making Code Directory *** \e[0m\r\n"
mkdir -p /usr/src/flylocal-web
cd /usr/src
echo "\r\n\r\n\e[44m *** Getting Code from Gitea *** \e[44m\r\n"
echo -e "\r\n\r\n\e[44m *** Getting Code from Gitea *** \e[0m\r\n"
git clone --depth 1 https://gitea.flylocal.us/spencer/flylocal-web.git
cd flylocal-web
curl -O https://spencerflagg.com/temp/flylocal-env/dev/.env
echo "\r\n\r\n\e[44m *** Killing Docker Containers *** \e[44m\r\n"
echo -e "\r\n\r\n\e[44m *** Killing Docker Containers *** \e[0m\r\n"
sudo docker kill $(docker ps -q)
echo "\r\n\r\n\e[44m *** Pruning Old Docker Images *** \e[44m\r\n"
echo -e "\r\n\r\n\e[44m *** Pruning Old Docker Images *** \e[0m\r\n"
sudo docker system prune
echo "\r\n\r\n\e[44m *** Building New Docker Image *** \e[44m\r\n"
echo -e "\r\n\r\n\e[44m *** Building New Docker Image *** \e[0m\r\n"
sudo docker build -t flylocal-web .
echo "\r\n\r\n\e[44m *** Running Docker Image *** \e[44m\r\n"
echo -e "\r\n\r\n\e[44m *** Running Docker Image *** \e[0m\r\n"
sudo docker run -it -p 3000:3000 flylocal-web

+ 2
- 2
login/index.js View File

@ -32,7 +32,7 @@ dotenv.config({ path: './.env' });
const portier = new PortierClient({
//broker: process.env.PORTIER_URL,
redirectUri: process.env.BASE_URL + "/login/verify",
redirectUri: 'https://flylocal.us' + "/login/verify",
});
@ -248,7 +248,7 @@ app.post("/verify", formParser, (req, res) => {
portier.verify(req.body.id_token).then((email) => {
const redirectButton = (req.query.redirect && typeof req.query.redirect !== 'undefined') ? `<a class="btn btn--primary" href="${req.query.redirect}">back to your flight</a>` : `<a class="btn btn--primary" href="${process.env.BASE_URL}">back to the map</a>`;
const redirectButton = (req.query.redirect && typeof req.query.redirect !== 'undefined') ? `<a class="btn btn--primary" href="${req.query.redirect}">back to your flight</a>` : `<a class="btn btn--primary" href="${'https://flylocal.us'}">back to the map</a>`;
// needed to string .cookie and .type together
res.cookie('email', email,

+ 4
- 4
nuxt.config.js View File

@ -27,16 +27,16 @@ export default {
{ name: 'format-detection', content: 'telephone=no' },
{ itemprop: 'name', content: 'Small Planes, Big Experiences' },
{ itemprop: 'description', content: 'FlyLocal is the best way to find local airlines that fly throughout the great state of Alaska. Explore the \'Last Frontier\' with FlyLocal.' },
{ itemprop: 'image', content: process.env.BASE_URL + '/screenshot.png' },
{ property: 'og:url', content: process.env.BASE_URL },
{ itemprop: 'image', content: 'https://flylocal.us' + '/screenshot.png' },
{ property: 'og:url', content: 'https://flylocal.us' },
{ property: 'og:type', content: 'website' },
{ property: 'og:title', content: 'Small Planes, Big Experiences' },
{ property: 'og:description', content: 'FlyLocal is the best way to find local airlines that fly throughout the great state of Alaska. Explore the \'Last Frontier\' with FlyLocal.' },
{ property: 'og:image', content: process.env.BASE_URL + '/screenshot.png' },
{ property: 'og:image', content: 'https://flylocal.us' + '/screenshot.png' },
{ name: 'twitter:card', content: 'summary_large_image' },
{ name: 'twitter:title', content: 'Small Planes, Big Experiences' },
{ name: 'twitter:description', content: 'FlyLocal is the best way to find local airlines that fly throughout the great state of Alaska. Explore the \'Last Frontier\' with FlyLocal.' },
{ name: 'twitter:image', content: process.env.BASE_URL + '/screenshot.png' }
{ name: 'twitter:image', content: 'https://flylocal.us' + '/screenshot.png' }
],
link: [
{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }

+ 1
- 1
plugins/env.js View File

@ -1,5 +1,5 @@
export default ({ app }, inject) => {
// Inject $hello(msg) in Vue, context and store.
inject('BASE_URL', () => process.env.BASE_URL)
inject('BASE_URL', () => 'https://flylocal.us')
inject('hello', msg => console.log(`Hello ${msg}!`))
}

Loading…
Cancel
Save