Skip to content

Commit

Permalink
build: removed compose files and changed docker port settings
Browse files Browse the repository at this point in the history
  • Loading branch information
ismailkarsli committed Aug 27, 2023
1 parent d1fc588 commit ca65e58
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 54 deletions.
12 changes: 3 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
FROM node:18-alpine as builder

RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
ENV NODE_ENV=production
ENV PORT=9494

COPY package.json package-lock.json ./
RUN npm ci
Expand All @@ -11,19 +12,12 @@ RUN npm run build

FROM node:18-alpine as production

RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app

ENV NODE_ENV=production

COPY --from=builder /usr/src/app/build ./build

COPY package.json package-lock.json ./

RUN npm ci --omit dev

RUN mkdir -p ./config

RUN ln -s /usr/src/app/config /config

CMD [ "npm", "run", "deploy" ]
CMD [ "npm", "run", "preview" ]
14 changes: 0 additions & 14 deletions docker-compose.override.yml

This file was deleted.

12 changes: 0 additions & 12 deletions docker-compose.prod.yml

This file was deleted.

11 changes: 0 additions & 11 deletions docker-compose.yml

This file was deleted.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
"dev": "vite dev --host",
"build": "vite build",
"preview": "vite preview",
"deploy": "PORT=9494 NODE_ENV=production node build/",
"test": "playwright test",
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
Expand Down
13 changes: 6 additions & 7 deletions vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
import { sveltekit } from '@sveltejs/kit/vite';
import { defineConfig } from 'vitest/config';
// import * as pkg from './package.json';

export default defineConfig({
export default defineConfig(() => ({
plugins: [sveltekit()],
// define: {
// PKG: pkg
// },
server: {
port: Number(process.env.PORT || 9494)
},
test: {
include: ['src/**/*.{test,spec}.{js,ts}']
},
ssr: {
external: ['reflect-metadata']
}
});
},
}));

0 comments on commit ca65e58

Please sign in to comment.