diff --git a/.dockerignore b/.dockerignore index 916a6f9..b609908 100644 --- a/.dockerignore +++ b/.dockerignore @@ -6,3 +6,5 @@ Dockerfile* .git/ .git/* .git/** +.nuxt/ +dist/ diff --git a/Dockerfile b/Dockerfile index 55b7e45..d850029 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ FROM mhart/alpine-node:12 -RUN apk update && \ +RUN apk update && \ apk upgrade && \ apk add --no-cache git nano bash jq @@ -8,13 +8,16 @@ WORKDIR /app COPY package.json package-lock.json ./ RUN npm install -RUN npm run-script build +RUN npm run build # Only copy over the node pieces we need from the above image -FROM mhart/alpine-node:slim-12 +FROM mhart/alpine-node:12 WORKDIR /app COPY --from=0 /app . COPY . . -EXPOSE 3000 -CMD ["npm", "run", "dev"] +EXPOSE 5302 +ENV PORT=5302 + +# CMD ["npm", "start"] +CMD npm run dev-clean diff --git a/nuxt.config.js b/nuxt.config.js index 823f8dc..22043bf 100644 --- a/nuxt.config.js +++ b/nuxt.config.js @@ -33,7 +33,7 @@ module.exports = { io: { sockets: [{ name: 'main', - url: process.env.SERVER_URL || 'http://localhost:3001' + url: process.env.SERVER_URL || 'http://localhost:5301' }] }, diff --git a/package.json b/package.json index 33d79ca..85edc88 100644 --- a/package.json +++ b/package.json @@ -6,13 +6,15 @@ "homepage": "https://github.com/viasite/site-audit-seo-viewer", "private": true, "scripts": { - "dev": "cross-env SERVER_URL=http://localhost:3001 HOST=0.0.0.0 PORT=3000 nuxt", + "dev": "cross-env SERVER_URL=http://localhost:5301 HOST=0.0.0.0 nuxt", + "dev-popstas": "cross-env SERVER_URL=http://popstas-server:5301 HOST=0.0.0.0 nuxt", "dev-clean": "nuxt", "build": "nuxt build", "deploy": "bash scripts/deploy.sh", "deploy-dev": "bash data/deploy-dev.sh", "start": "nuxt start", "generate": "nuxt generate -c nuxt.config.prod.js", + "generate-clean": "nuxt generate", "generate-dev": "nuxt generate -c data/nuxt.config.dev.js", "version": "npm run changelog && git add CHANGELOG.md", "postversion": "git push --tags && npm run release", diff --git a/pages/scan.vue b/pages/scan.vue index 591ce20..46d53d8 100644 --- a/pages/scan.vue +++ b/pages/scan.vue @@ -48,7 +48,7 @@