Skip to content

Commit

Permalink
updated docker
Browse files Browse the repository at this point in the history
  • Loading branch information
dustinwloring1988 committed Nov 27, 2024
1 parent e5f5753 commit 2c3323c
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 4 deletions.
10 changes: 8 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,14 @@ RUN pnpm install
# Copy the rest of the application code
COPY . .

# Expose the port
# Build the application
RUN pnpm run build

# Make sure bindings.sh is executable
RUN chmod +x bindings.sh

# Expose the port the app runs on (adjust if you specified a different port)
EXPOSE 5173

# Start the application
CMD ["pnpm", "run", "dev"]
CMD ["pnpm", "run", "start"]
10 changes: 9 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,12 @@ services:
environment:
- NODE_ENV=production
volumes:
- .:/app
# This volume is for development purposes, allowing live code updates
# Comment out or remove for production
- .:/app
# This volume is to prevent node_modules from being overwritten by the above volume
- /app/node_modules
command: pnpm run start

volumes:
node_modules:
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"test:watch": "vitest",
"lint": "eslint --cache --cache-location ./node_modules/.cache/eslint .",
"lint:fix": "npm run lint -- --fix",
"start": "bindings=$(./bindings.sh) && wrangler pages dev ./build/client $bindings",
"start": "bindings=$(./bindings.sh) && wrangler pages dev ./build/client $bindings --ip 0.0.0.0 --port 3000",
"typecheck": "tsc",
"typegen": "wrangler types",
"preview": "pnpm run build && pnpm run start"
Expand Down

0 comments on commit 2c3323c

Please sign in to comment.