mirror of
https://github.com/fergalmoran/bitchmin.git
synced 2025-12-22 09:27:53 +00:00
Cypress fucks docker builds in github
This commit is contained in:
@@ -2,10 +2,10 @@ FROM node:14-stretch as build-stage
|
||||
|
||||
WORKDIR /app
|
||||
COPY package*.json ./
|
||||
RUN npm install
|
||||
RUN yarn install --production
|
||||
COPY . .
|
||||
COPY .eslintrc.js ./
|
||||
RUN npm run build
|
||||
RUN yarn build --production
|
||||
|
||||
# Create the container from the alpine linux image
|
||||
FROM alpine:3.7 as production-image
|
||||
|
||||
0
client/build.sh
Normal file → Executable file
0
client/build.sh
Normal file → Executable file
@@ -31,7 +31,8 @@
|
||||
"vuex": "^3.4.0",
|
||||
"@mdi/font": "^5.5.55",
|
||||
"@types/lodash": "^4.14.161",
|
||||
"compass-mixins": "^0.12.10"
|
||||
"compass-mixins": "^0.12.10",
|
||||
"@vue/cli-service": "~4.5.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/chai": "^4.2.11",
|
||||
@@ -39,14 +40,12 @@
|
||||
"@typescript-eslint/eslint-plugin": "^2.33.0",
|
||||
"@typescript-eslint/parser": "^2.33.0",
|
||||
"@vue/cli-plugin-babel": "~4.5.0",
|
||||
"@vue/cli-plugin-e2e-cypress": "~4.5.0",
|
||||
"@vue/cli-plugin-eslint": "~4.5.0",
|
||||
"@vue/cli-plugin-pwa": "~4.5.0",
|
||||
"@vue/cli-plugin-router": "~4.5.0",
|
||||
"@vue/cli-plugin-typescript": "~4.5.0",
|
||||
"@vue/cli-plugin-unit-mocha": "~4.5.0",
|
||||
"@vue/cli-plugin-vuex": "~4.5.0",
|
||||
"@vue/cli-service": "~4.5.0",
|
||||
"@vue/eslint-config-airbnb": "^5.0.2",
|
||||
"@vue/eslint-config-standard": "^5.1.2",
|
||||
"@vue/eslint-config-typescript": "^5.0.2",
|
||||
|
||||
@@ -1,48 +1,37 @@
|
||||
<template>
|
||||
<v-row align="center" justify="center">
|
||||
<v-col cols="12" sm="8" md="4">
|
||||
<v-card class="elevation-12">
|
||||
<v-toolbar color="primary" dark flat>
|
||||
<v-toolbar-title>Login form</v-toolbar-title>
|
||||
<v-spacer></v-spacer>
|
||||
<v-tooltip bottom>
|
||||
<template v-slot:activator="{ on }">
|
||||
<v-btn :href="source" icon large target="_blank" v-on="on">
|
||||
<v-icon>mdi-code-tags</v-icon>
|
||||
</v-btn>
|
||||
</template>
|
||||
<span>Source</span>
|
||||
</v-tooltip>
|
||||
</v-toolbar>
|
||||
<v-layout align-center justify-center>
|
||||
<v-flex xs12 sm8 md4 lg4>
|
||||
<v-card class="elevation-1 pa-3">
|
||||
<v-card-text>
|
||||
<div class="layout column align-center">
|
||||
<img src="/images/bitchmints.jpg" alt="Vue Material Admin" width="360" height="240">
|
||||
<h1 class="flex my-4 primary--text">Bitch::Mints</h1>
|
||||
</div>
|
||||
<v-form>
|
||||
<v-text-field
|
||||
label="Login"
|
||||
name="login"
|
||||
prepend-icon="mdi-account"
|
||||
placeholder="Email address"
|
||||
v-model="email"
|
||||
label="Login"
|
||||
type="text"
|
||||
></v-text-field>
|
||||
|
||||
v-model="email"
|
||||
:error="error"
|
||||
:rules="[rules.required]" />
|
||||
<v-text-field
|
||||
id="password"
|
||||
label="Password"
|
||||
name="password"
|
||||
prepend-icon="mdi-lock"
|
||||
placeholder="Password"
|
||||
v-model="password"
|
||||
type="password"
|
||||
></v-text-field>
|
||||
name="password"
|
||||
label="Password"
|
||||
id="password"
|
||||
:rules="[rules.required]"
|
||||
v-model="password"
|
||||
:error="error" />
|
||||
</v-form>
|
||||
</v-card-text>
|
||||
<v-card-actions>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn @click="authenticate" color="primary">Login</v-btn>
|
||||
<v-btn block color="primary" @click="authenticate" :loading="loading">Login</v-btn>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
@@ -53,6 +42,11 @@ import store from '@/store';
|
||||
components: {}
|
||||
})
|
||||
export default class Login extends Vue {
|
||||
loading: false;
|
||||
error = false;
|
||||
rules = {
|
||||
required: (value: string) => !!value || 'Required.'
|
||||
};
|
||||
email = '';
|
||||
|
||||
password = '';
|
||||
@@ -60,12 +54,21 @@ export default class Login extends Vue {
|
||||
errorMsg = '';
|
||||
|
||||
authenticate() {
|
||||
if (!this.email || !this.password) {
|
||||
this.result = 'Email and Password can\'t be null.';
|
||||
this.showResult = true;
|
||||
return;
|
||||
}
|
||||
store
|
||||
.dispatch('login', { email: this.email, password: this.password })
|
||||
.then(() => {
|
||||
console.log('Login', 'store_dispatch_login');
|
||||
this.$router.push('/');
|
||||
});
|
||||
}).error(() => {
|
||||
this.error = true;
|
||||
this.result = 'Email or Password is incorrect.';
|
||||
this.showResult = true;
|
||||
});
|
||||
}
|
||||
|
||||
register() {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import logging
|
||||
import os
|
||||
|
||||
import requests
|
||||
from flask import jsonify, request
|
||||
from flask_jwt_extended import jwt_required, get_current_user
|
||||
from IPy import IP
|
||||
@@ -184,7 +185,7 @@ def get_request_headers():
|
||||
|
||||
@api.route("/dns/myip", methods=["GET"])
|
||||
def get_my_ip():
|
||||
ip = request.remote_addr
|
||||
ip = requests.get('https://checkip.amazonaws.com').text.strip()
|
||||
|
||||
if IP(ip).iptype() == 'PUBLIC':
|
||||
return jsonify({
|
||||
|
||||
Reference in New Issue
Block a user