Skip to content

Commit

Permalink
Merge pull request #5 from MihkelMK/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
MihkelMK authored Nov 20, 2023
2 parents 8012b6d + 9c163de commit e4633da
Show file tree
Hide file tree
Showing 34 changed files with 2,022 additions and 1,581 deletions.
1 change: 0 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ services:
container_name: monospacee
image: monospacee
build: ./frontend
user: "node"
restart: unless-stopped
ports:
- 9001:3000
Expand Down
3 changes: 3 additions & 0 deletions frontend/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules
# Keep environment variables out of version control
.env
25 changes: 13 additions & 12 deletions frontend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,21 @@ FROM node:18 AS external-website
# The WORKDIR instruction sets the working directory for everything that will happen next
WORKDIR /app

# Copy all local files into the image
COPY . .

# Clean install all node modules
RUN rm -rf pnpm-lock.yaml node_modules .svelte-kit && yarn global add pnpm && pnpm i
# Install packages
RUN yarn global add pnpm
COPY package.json .
RUN pnpm i

# Build SvelteKit app
RUN npm run build
# Create DB
COPY ./prisma/schema.prisma ./prisma/schema.prisma
COPY tsconfig.json ./
RUN npx prisma generate

# Delete source code files that were used to build the app that are no longer needed
RUN rm -rf src/ static/ docker-compose.yml
COPY . .

# The USER instruction sets the user name to use as the default user for the remainder of the current stage
USER node:node
# Build SvelteKit app
RUN pnpm build && \
rm -rf src/ static/

# This is the command that will be run inside the image when you tell Docker to start the container
CMD ["node","build/index.js"]
CMD ["ORIGIN=https://monospac.ee", "node","build/index.js"]
50 changes: 26 additions & 24 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,43 +13,45 @@
},
"devDependencies": {
"@picocss/pico": "^1.5.10",
"@sveltejs/adapter-auto": "^2.1.0",
"@sveltejs/kit": "^1.23.0",
"@types/cookie": "^0.5.1",
"@types/node": "^20.5.6",
"@typescript-eslint/eslint-plugin": "^6.4.1",
"@typescript-eslint/parser": "^6.4.1",
"@zerodevx/svelte-img": "^2.0.3",
"eslint": "^8.48.0",
"@sveltejs/adapter-auto": "^2.1.1",
"@sveltejs/kit": "^1.27.6",
"@types/cookie": "^0.5.4",
"@types/node": "^20.9.2",
"@typescript-eslint/eslint-plugin": "^6.11.0",
"@typescript-eslint/parser": "^6.11.0",
"@zerodevx/svelte-img": "^2.1.0",
"eslint": "^8.54.0",
"eslint-config-prettier": "^9.0.0",
"mdsvex": "^0.11.0",
"prettier": "^3.0.2",
"prettier-plugin-svelte": "^3.0.3",
"sass": "^1.66.1",
"svelte": "^4.2.0",
"svelte-check": "^3.5.0",
"svelte-meta-tags": "^3.0.3",
"svelte-preprocess": "^5.0.4",
"prettier": "^3.1.0",
"prettier-plugin-svelte": "^3.1.0",
"prisma": "^5.6.0",
"sass": "^1.69.5",
"svelte": "^4.2.7",
"svelte-check": "^3.6.0",
"svelte-meta-tags": "^3.1.0",
"svelte-preprocess": "^5.1.0",
"tslib": "^2.6.2",
"typescript": "^5.2.2",
"url": "^0.11.1",
"vite": "^4.4.9"
"url": "^0.11.3",
"vite": "^4.5.0"
},
"type": "module",
"dependencies": {
"@fontsource-variable/roboto-mono": "^5.0.9",
"@fontsource-variable/roboto-mono": "^5.0.16",
"@fontsource/share-tech-mono": "^5.0.8",
"@jsdevtools/rehype-toc": "^3.0.2",
"@prisma/client": "5.6.0",
"@sveltejs/adapter-node": "^1.3.1",
"eslint-plugin-svelte": "^2.33.0",
"eslint-plugin-svelte": "^2.35.0",
"iconify-icon": "^1.0.8",
"rehype-preset-minify": "^6.0.0",
"rehype-rewrite": "^3.0.6",
"rehype-preset-minify": "^7.0.0",
"rehype-rewrite": "^4.0.0",
"rehype-shift-heading": "^2.0.0",
"rehype-slug": "^5.1.0",
"rehype-slug": "^6.0.0",
"remark-capitalize-headings": "^1.0.3",
"remark-sectionize": "^2.0.0",
"remark-squeeze-paragraphs": "^5.0.1",
"shiki": "^0.14.3"
"remark-squeeze-paragraphs": "^6.0.0",
"shiki": "^0.14.5"
}
}
Loading

0 comments on commit e4633da

Please sign in to comment.