Skip to content

Commit

Permalink
Add placeholders to containerize the full stack app
Browse files Browse the repository at this point in the history
Vite currently isn't working in a Docker environment for development following along here:  vitejs/vite#16522
Going to commit these files as placeholders, and probably still containerize the backend/db together even if I can't get Nuxt in there yet.
  • Loading branch information
FlippinBerger committed Apr 25, 2024
1 parent 2054941 commit 0f9875a
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 0 deletions.
35 changes: 35 additions & 0 deletions app/Dockerfile
@@ -0,0 +1,35 @@
# ARG NODE_VERSION=18.17.0
#
# FROM node:${NODE_VERSION}-slim as base
#
# ENV NODE_ENV=development
#
# WORKDIR /src
#
# # Build
# FROM base as build
#
# COPY --link package.json yarn.lock ./
# RUN yarn install
#
# # Run
# FROM base
#
# COPY --from=build /src/node_modules /src/node_modules
#
# CMD [ "yarn", "run", "dev" ]

FROM node:20.0.0

WORKDIR /app

COPY package.json yarn.lock ./

RUN yarn install

COPY . .

EXPOSE 3000

# RUN yarn run build
CMD [ "yarn", "run", "dev" ]
14 changes: 14 additions & 0 deletions docker-compose.yml
@@ -0,0 +1,14 @@
volumes:
node_modules:
services:
dj-app:
build:
context: ./vue-app
# TODO I think I only needs this when I specify a dev dockerfile
# dockerfile: ./app/Dockerfile
ports:
- "3000:3000"
- "24678:24678"
volumes:
- ./vue-app:/src
- ./vue-app/node_modules:/src/node_modules
Empty file added server/Dockerfile
Empty file.

0 comments on commit 0f9875a

Please sign in to comment.