Skip to content

Commit 09a8754

Browse files
Setting up docker
1 parent 8a6725e commit 09a8754

16 files changed

+87
-12455
lines changed

.dockerignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
node_modules
2+
npm-debug.log

.travis.yml

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
sudo: required
2+
services:
3+
- docker
4+
5+
script:
6+
- docker build -t tocqueville95/webshopnuxt -f Dockerfile.dev .

.vscode/settings.json

+3
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,7 @@
3333
}
3434
],
3535
"prettier-eslint.eslintIntegration": true,
36+
"editor.codeActionsOnSave": {
37+
"source.fixAll.eslint": true
38+
},
3639
}

Dockerfile

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
FROM node:alpine
2+
3+
WORKDIR /usr/src/app
4+
5+
COPY package.json .
6+
7+
RUN npm install
8+
9+
COPY . .
10+
11+
CMD [ "npm", "start" ]

Dockerfile.dev

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
FROM node:alpine
2+
3+
WORKDIR /usr/src/app
4+
5+
COPY package.json .
6+
7+
RUN npm install
8+
9+
CMD [ "npm", "run", "dockerdev" ]

components/Search.vue

+3-3
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
<script lang="ts">
2828
import { createComponent, watch } from '@vue/composition-api';
29-
import ClickOutside from 'vue-click-outside';
29+
const ClickOutside = require('vue-click-outside');
3030
3131
export default createComponent({
3232
directives: {
@@ -67,9 +67,9 @@ export default createComponent({
6767
const searchString = ctx.root.$route.query.search;
6868
if (searchString) {
6969
moveLeft();
70-
state.searchValue = ctx.root.$route.query.search;
70+
(state as any).searchValue = ctx.root.$route.query.search;
7171
if (ctx.refs.input) {
72-
ctx.refs.input.value = ctx.root.$route.query.search;
72+
(ctx.refs.input as any).value = ctx.root.$route.query.search;
7373
}
7474
}
7575
});

docker-compose.yml

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
version: '3'
2+
services:
3+
web:
4+
build:
5+
context: .
6+
dockerfile: Dockerfile.dev
7+
ports:
8+
- "8081:8081"
9+
volumes:
10+
- /usr/src/app/node_modules/
11+
- .:/usr/src/app

models/Order.ts

+10-1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,15 @@ interface IPayment {
1010
amount : IAmount;
1111
}
1212

13+
const amount : IAmount = {
14+
value: '0',
15+
currency: 'eur',
16+
};
17+
18+
const payment : IPayment = {
19+
amount,
20+
};
21+
1322
export default class Order {
1423
id: string;
1524

@@ -38,7 +47,7 @@ export default class Order {
3847
cartId: string = '',
3948
products: Array<CartProduct> = [],
4049
ideal: boolean = false,
41-
orderPayment: object = {},
50+
orderPayment: IPayment = payment,
4251
sendingCosts: number = 0,
4352
user: User = new User(),
4453
created: Date = new Date(),

models/Response.ts

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
export default class Response<T> {
2+
taken : number;
3+
4+
skipped : number;
5+
6+
total : number;
7+
8+
data: T[]
9+
10+
constructor(taken = Number.MAX_VALUE, skipped = 0, total = Number.MAX_VALUE, data = []) {
11+
this.taken = taken;
12+
this.skipped = skipped;
13+
this.total = total;
14+
this.data = data;
15+
}
16+
}

nuxt.config.js

+4
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ module.exports = {
3535
// Add exception
3636
transpile: ['vee-validate/dist/rules'],
3737
},
38+
server: {
39+
port: 8081,
40+
host: '0.0.0.0',
41+
},
3842
vue: {
3943
config: {
4044
performance: true,

0 commit comments

Comments
 (0)