Skip to content

Commit

Permalink
Merge pull request #6 from julwrites/rebuild
Browse files Browse the repository at this point in the history
Total Rebuild from Nuxt3 Minimal Starter and a lot of hacking
  • Loading branch information
julwrites committed Aug 10, 2024
2 parents ebc23f1 + f8fe102 commit e4323be
Show file tree
Hide file tree
Showing 77 changed files with 6,798 additions and 20,132 deletions.
7 changes: 7 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# .dockerignore
/.nuxt
/.output
/node_modules

.gitignore
README.md
29 changes: 4 additions & 25 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,29 +1,8 @@
# Nuxt dev/build outputs
.output
.nuxt
.nitro
.cache
dist

# Node dependencies
pnpm-lock.yaml
node_modules

# Logs
logs
*.log

# Misc
.DS_Store
.fleet
.idea

# Local env files
.nuxt
.output
.env
.env.*
!.env.example

# SQLite files
*.db

# ESLint
.eslintcache
data
1 change: 0 additions & 1 deletion .npmrc

This file was deleted.

26 changes: 26 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Use an official Node runtime as the base image
FROM node:22-bookworm-slim

# Set the working directory in the container
WORKDIR /app

# Copy package.json and pnpm-lock.yaml
COPY package.json ./

# Install pnpm globally
RUN npm install -g pnpm

# Install dependencies
RUN pnpm install

# Copy the rest of the application code
COPY . .

# Build the application
RUN pnpm run build

# Expose the port the app runs on
EXPOSE 3000

# Set the command to run the app
CMD ["node", ".output/server/index.mjs"]
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ pnpm install

# yarn
yarn install

# bun
bun install
```

## Development Server
Expand All @@ -30,6 +33,9 @@ pnpm run dev

# yarn
yarn dev

# bun
bun run dev
```

## Production
Expand All @@ -45,6 +51,9 @@ pnpm run build

# yarn
yarn build

# bun
bun run build
```

Locally preview production build:
Expand All @@ -58,6 +67,9 @@ pnpm run preview

# yarn
yarn preview

# bun
bun run preview
```

Check out the [deployment documentation](https://nuxt.com/docs/getting-started/deployment) for more information.
6 changes: 0 additions & 6 deletions app.config.ts

This file was deleted.

7 changes: 3 additions & 4 deletions app.vue
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
<template>
<div class="dark:bg-neutral-900 h-screen">
<VitePwaManifest />
<div>
<NuxtPwaManifest />
<NuxtLoadingIndicator />
<NuxtLayout>
<NuxtPage />
</NuxtLayout>
<UNotifications />
</div>
</template>
</template>
81 changes: 0 additions & 81 deletions components/onboarding/Setup.vue

This file was deleted.

92 changes: 0 additions & 92 deletions components/onboarding/SetupStep01.vue

This file was deleted.

26 changes: 26 additions & 0 deletions composables/useLocalStorage.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
export function useLocalStorage() {
const setItem = (key: string, value: string) => {
if (process.client) {
localStorage.setItem(key, value);
}
};

const getItem = (key: string) => {
if (process.client) {
return localStorage.getItem(key);
}
return null;
};

const removeItem = (key: string) => {
if (process.client) {
localStorage.removeItem(key);
}
};

return {
setItem,
getItem,
removeItem,
};
}
7 changes: 7 additions & 0 deletions deploy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

docker-compose down

docker build . -t cash-register

docker-compose up -d
10 changes: 10 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: "3"
services:
cash-register:
# Use the built image from the Dockerfile
image: cash-register # You might need to specify a tag if you're building multiple images
ports:
- "14321:3000"
volumes:
- /Users/julianteh/OneDrive/Chillian/Cash-Register/data:/app/data
env_file: /Users/julianteh/OneDrive/Chillian/Cash-Register/data/cash-register.env
6 changes: 0 additions & 6 deletions drizzle.config.ts

This file was deleted.

17 changes: 0 additions & 17 deletions eslint.config.js

This file was deleted.

1 change: 1 addition & 0 deletions expenses.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
id,amount,description,date,category
Loading

0 comments on commit e4323be

Please sign in to comment.