Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix docker static assets #27

Merged
merged 8 commits into from
Jan 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ node_modules
dist
*.log
.env
static/style.css

# virtualenvs
.nvenv/
.venv/
.venv/
static/style.css
9 changes: 4 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,10 @@ ENV HOST=0.0.0.0
ENV PORT=3000
EXPOSE 3000
WORKDIR /app
USER node
COPY --chown=node:node package*.json ./
COPY --chown=node:node static ./static
COPY --chown=node:node src/views ./dist/views
COPY --from=builder --chown=node:node /app/node_modules ./node_modules
COPY --from=builder --chown=node:node /app/package*.json ./
COPY --from=builder --chown=node:node /app/static ./static
COPY --from=builder --chown=node:node /app/src/views ./dist/views
COPY --from=builder --chown=node:node /app/dist ./dist
RUN npm install --omit=dev
USER node
CMD ["npm", "start"]
9 changes: 6 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
{
"version": "0.2.6",
"version": "0.2.7",
"name": "tech-pizza-delivery-waiter",
"title": "Tech&Pizza Delivery Waiter",
"description": "A simple event delivery booking management system",
"owner": "GDG Valle d'Aosta",
"authors": [
"Manuel Zavatta <manuel.zavatta@gmail.com>"
"Manuel Zavatta <manuel.zavatta@gmail.com>",
"Alain Martini <manuel.zavatta@gmail.com>",
"Mirtilla Cecchi <mirtillacecchi@gmail.com>",
"Giufus Anonymous <giufus@gmail.com>"
],
"license": "MIT",
"keywords": [
Expand All @@ -15,8 +18,8 @@
],
"main": "main.js",
"scripts": {
"build": "tsc && tailwindcss -i ./src/css/style.css -o ./static/style.css && cp -rp ./src/views ./dist",
"start": "node dist/main.js",
"build": "tsc && tailwindcss -i ./src/css/style.css -o ./static/style.css && cp -rp ./src/views ./dist",
"watch": "concurrently \"nodemon --exec tsx src/main.ts\" \"tailwindcss -i ./src/css/style.css -o ./static/style.css --watch\""
},
"dependencies": {
Expand Down
1 change: 0 additions & 1 deletion tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,3 @@ module.exports = {
filename: 'style.css'
}
}

Loading