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
|
WORKDIR /app
|
||||||
COPY package*.json ./
|
COPY package*.json ./
|
||||||
RUN npm install
|
RUN yarn install --production
|
||||||
COPY . .
|
COPY . .
|
||||||
COPY .eslintrc.js ./
|
COPY .eslintrc.js ./
|
||||||
RUN npm run build
|
RUN yarn build --production
|
||||||
|
|
||||||
# Create the container from the alpine linux image
|
# Create the container from the alpine linux image
|
||||||
FROM alpine:3.7 as production-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",
|
"vuex": "^3.4.0",
|
||||||
"@mdi/font": "^5.5.55",
|
"@mdi/font": "^5.5.55",
|
||||||
"@types/lodash": "^4.14.161",
|
"@types/lodash": "^4.14.161",
|
||||||
"compass-mixins": "^0.12.10"
|
"compass-mixins": "^0.12.10",
|
||||||
|
"@vue/cli-service": "~4.5.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/chai": "^4.2.11",
|
"@types/chai": "^4.2.11",
|
||||||
@@ -39,14 +40,12 @@
|
|||||||
"@typescript-eslint/eslint-plugin": "^2.33.0",
|
"@typescript-eslint/eslint-plugin": "^2.33.0",
|
||||||
"@typescript-eslint/parser": "^2.33.0",
|
"@typescript-eslint/parser": "^2.33.0",
|
||||||
"@vue/cli-plugin-babel": "~4.5.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-eslint": "~4.5.0",
|
||||||
"@vue/cli-plugin-pwa": "~4.5.0",
|
"@vue/cli-plugin-pwa": "~4.5.0",
|
||||||
"@vue/cli-plugin-router": "~4.5.0",
|
"@vue/cli-plugin-router": "~4.5.0",
|
||||||
"@vue/cli-plugin-typescript": "~4.5.0",
|
"@vue/cli-plugin-typescript": "~4.5.0",
|
||||||
"@vue/cli-plugin-unit-mocha": "~4.5.0",
|
"@vue/cli-plugin-unit-mocha": "~4.5.0",
|
||||||
"@vue/cli-plugin-vuex": "~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-airbnb": "^5.0.2",
|
||||||
"@vue/eslint-config-standard": "^5.1.2",
|
"@vue/eslint-config-standard": "^5.1.2",
|
||||||
"@vue/eslint-config-typescript": "^5.0.2",
|
"@vue/eslint-config-typescript": "^5.0.2",
|
||||||
|
|||||||
@@ -1,48 +1,37 @@
|
|||||||
<template>
|
<template>
|
||||||
<v-row align="center" justify="center">
|
<v-layout align-center justify-center>
|
||||||
<v-col cols="12" sm="8" md="4">
|
<v-flex xs12 sm8 md4 lg4>
|
||||||
<v-card class="elevation-12">
|
<v-card class="elevation-1 pa-3">
|
||||||
<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-card-text>
|
<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-form>
|
||||||
<v-text-field
|
<v-text-field
|
||||||
label="Login"
|
|
||||||
name="login"
|
name="login"
|
||||||
prepend-icon="mdi-account"
|
label="Login"
|
||||||
placeholder="Email address"
|
|
||||||
v-model="email"
|
|
||||||
type="text"
|
type="text"
|
||||||
></v-text-field>
|
v-model="email"
|
||||||
|
:error="error"
|
||||||
|
:rules="[rules.required]" />
|
||||||
<v-text-field
|
<v-text-field
|
||||||
id="password"
|
|
||||||
label="Password"
|
|
||||||
name="password"
|
|
||||||
prepend-icon="mdi-lock"
|
|
||||||
placeholder="Password"
|
|
||||||
v-model="password"
|
|
||||||
type="password"
|
type="password"
|
||||||
></v-text-field>
|
name="password"
|
||||||
|
label="Password"
|
||||||
|
id="password"
|
||||||
|
:rules="[rules.required]"
|
||||||
|
v-model="password"
|
||||||
|
:error="error" />
|
||||||
</v-form>
|
</v-form>
|
||||||
</v-card-text>
|
</v-card-text>
|
||||||
<v-card-actions>
|
<v-card-actions>
|
||||||
<v-spacer></v-spacer>
|
<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-actions>
|
||||||
</v-card>
|
</v-card>
|
||||||
</v-col>
|
</v-flex>
|
||||||
</v-row>
|
</v-layout>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
@@ -53,6 +42,11 @@ import store from '@/store';
|
|||||||
components: {}
|
components: {}
|
||||||
})
|
})
|
||||||
export default class Login extends Vue {
|
export default class Login extends Vue {
|
||||||
|
loading: false;
|
||||||
|
error = false;
|
||||||
|
rules = {
|
||||||
|
required: (value: string) => !!value || 'Required.'
|
||||||
|
};
|
||||||
email = '';
|
email = '';
|
||||||
|
|
||||||
password = '';
|
password = '';
|
||||||
@@ -60,12 +54,21 @@ export default class Login extends Vue {
|
|||||||
errorMsg = '';
|
errorMsg = '';
|
||||||
|
|
||||||
authenticate() {
|
authenticate() {
|
||||||
|
if (!this.email || !this.password) {
|
||||||
|
this.result = 'Email and Password can\'t be null.';
|
||||||
|
this.showResult = true;
|
||||||
|
return;
|
||||||
|
}
|
||||||
store
|
store
|
||||||
.dispatch('login', { email: this.email, password: this.password })
|
.dispatch('login', { email: this.email, password: this.password })
|
||||||
.then(() => {
|
.then(() => {
|
||||||
console.log('Login', 'store_dispatch_login');
|
console.log('Login', 'store_dispatch_login');
|
||||||
this.$router.push('/');
|
this.$router.push('/');
|
||||||
});
|
}).error(() => {
|
||||||
|
this.error = true;
|
||||||
|
this.result = 'Email or Password is incorrect.';
|
||||||
|
this.showResult = true;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
register() {
|
register() {
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
|
|
||||||
|
import requests
|
||||||
from flask import jsonify, request
|
from flask import jsonify, request
|
||||||
from flask_jwt_extended import jwt_required, get_current_user
|
from flask_jwt_extended import jwt_required, get_current_user
|
||||||
from IPy import IP
|
from IPy import IP
|
||||||
@@ -184,7 +185,7 @@ def get_request_headers():
|
|||||||
|
|
||||||
@api.route("/dns/myip", methods=["GET"])
|
@api.route("/dns/myip", methods=["GET"])
|
||||||
def get_my_ip():
|
def get_my_ip():
|
||||||
ip = request.remote_addr
|
ip = requests.get('https://checkip.amazonaws.com').text.strip()
|
||||||
|
|
||||||
if IP(ip).iptype() == 'PUBLIC':
|
if IP(ip).iptype() == 'PUBLIC':
|
||||||
return jsonify({
|
return jsonify({
|
||||||
|
|||||||
Reference in New Issue
Block a user