-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #17 from ajesuscode/dev
Dockerfile for local development
- Loading branch information
Showing
4 changed files
with
104 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Use the official Node.js image as the base | ||
FROM node:18-alpine | ||
|
||
# Set the working directory in the container | ||
WORKDIR /app | ||
|
||
# Copy package.json and package-lock.json (or yarn.lock) to the working directory | ||
COPY package*.json ./ | ||
|
||
# Install dependencies (including dev dependencies) | ||
RUN npm install | ||
|
||
# Copy the entire project to the working directory | ||
COPY . . | ||
|
||
# Expose the port your app will run on | ||
EXPOSE 3000 | ||
|
||
# Set the command to start your Next.js app in development mode | ||
CMD ["npm", "run", "dev"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,10 @@ | ||
# Surf Pintxos | ||
|
||
### Open source Surf forecast for all Pays Basque spots | ||
|
||
### Running localy from Docker | ||
|
||
1. Clone repository to your machine | ||
2. Build the development Docker image using `docker build -f Dockerfile.dev -t my-nextjs-app-dev .` | ||
3. Run the development container with the volume mount: `docker run -p 3000:3000 -v $(pwd):/app my-nextjs-app-dev` | ||
4. The container will now have access to the codebase on the host machine, and any changes made to the codebase will be reflected in the running Next.js app inside the container. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters