diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..c0ad813 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,22 @@ +# Nuxt dev/build outputs +.output +.data +.nuxt +.nitro +.cache +dist + +# Node dependencies +node_modules + +# Logs +logs +*.log + +# Misc +.DS_Store +.fleet +.idea + +# Tauri +src-tauri diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..d62f486 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,18 @@ +FROM node:latest AS build +WORKDIR /app + +COPY package.json . +RUN npm i + +COPY . . + +RUN npm run build + +# Run +FROM node:latest +WORKDIR /app + +COPY --from=build /app/.output /app/.output + +EXPOSE 3000 +CMD [ "node", ".output/server/index.mjs" ] diff --git a/compose.yml b/compose.yml new file mode 100644 index 0000000..44a17da --- /dev/null +++ b/compose.yml @@ -0,0 +1,7 @@ +services: + my-app: + build: . + ports: + - "3000:3000" + env_file: + - ./.env diff --git a/justfile b/justfile new file mode 100644 index 0000000..de244a1 --- /dev/null +++ b/justfile @@ -0,0 +1,6 @@ +build version: + docker build -t task-line:{{version}} . + +publish version: (build version) + docker tag task-line:{{version}} ghcr.io/tobinio/task-line:{{version}} + docker push ghcr.io/tobinio/task-line:{{version}}