-
Notifications
You must be signed in to change notification settings - Fork 3
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 #32 from shotnothing/simin-docker
Docker set up
- Loading branch information
Showing
5 changed files
with
53 additions
and
10 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,2 @@ | ||
# local env files | ||
.env*.local |
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,15 @@ | ||
version: '3' | ||
|
||
services: | ||
backend: | ||
build: ./server | ||
command: python ./server/manage.py runserver 0.0.0.0:8000 | ||
volumes: | ||
- .:/volume | ||
ports: | ||
- "8000:8000" | ||
|
||
frontend: | ||
build: ./webapp | ||
ports: | ||
- "3000:3000" |
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,7 +1,18 @@ | ||
# Use the official Python 3 image as base | ||
FROM python:3 | ||
ENV PYTHONDONTWRITEBYTECODE=1 | ||
ENV PYTHONUNBUFFERED=1 | ||
|
||
# Set environment variables to optimize Python environment | ||
ENV PYTHONDONTWRITEBYTECODE=1 | ||
ENV PYTHONUNBUFFERED=1 | ||
|
||
# Set the working directory inside the container | ||
WORKDIR /volume | ||
|
||
# Copy the requirements.txt file from the local filesystem into the container's working directory | ||
COPY requirements.txt /volume/ | ||
|
||
# Install Python dependencies from requirements.txt using pip | ||
RUN pip install -r requirements.txt | ||
|
||
# Copy the rest of the application files from the local filesystem into the container's working directory | ||
COPY . /volume/ |
This file was deleted.
Oops, something went wrong.
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,23 @@ | ||
# Use the official Node.js image as the base | ||
FROM node:20-alpine | ||
|
||
# Set the working directory inside the container | ||
WORKDIR /src/app | ||
|
||
# Copy package.json and package-lock.json to the container | ||
COPY package*.json ./ | ||
|
||
# Install dependencies | ||
RUN npm install | ||
|
||
# Copy the rest of the application code | ||
COPY . . | ||
|
||
# Build the Next.js application | ||
RUN npm run build | ||
|
||
# Expose the port Next.js is running on | ||
EXPOSE 3000 | ||
|
||
# Command to run the Next.js application | ||
CMD ["npm", "start"] |