Skip to content

Commit

Permalink
trying to make it work
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisclark committed Jul 14, 2024
1 parent ceee12a commit 5b67436
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 1,725 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ ORM

# Set environment variables for NVM
ENV NVM_DIR /root/.nvm
ENV NODE_VERSION 18
ENV NODE_VERSION 20

# Install NVM, Node.js, and npm dependencies
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash \
Expand Down
12 changes: 12 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
services:
web:
build: .
command: ["python", "manage.py", "runserver", "0.0.0.0:8000"]
ports:
- "8000:8000"
- "5173:5173"
volumes:
- .:/app
environment:
- DJANGO_SETTINGS_MODULE=test_project.settings

8 changes: 8 additions & 0 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,14 @@ nvm use 18
echo "Node version: $(node --version)"
echo "NPM version: $(npm --version)"

# Remove node_modules and package-lock.json before reinstalling npm packages
echo "Cleaning node_modules and package-lock.json"
rm -rf node_modules package-lock.json

# Reinstall npm packages
echo "Installing npm packages"
npm install

# Start Django server
python manage.py runserver 0.0.0.0:8000 &

Expand Down
Loading

0 comments on commit 5b67436

Please sign in to comment.