-
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.
- Loading branch information
1 parent
bbb8338
commit 7156b90
Showing
169 changed files
with
244 additions
and
32,208 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 |
---|---|---|
@@ -1,3 +1 @@ | ||
venv/ | ||
Pipfile | ||
Pipfile.lock | ||
/Steps |
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,4 +1 @@ | ||
venv/ | ||
db.sqlite3 | ||
.idea/ | ||
.env | ||
.env |
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,22 +1,18 @@ | ||
# For Django5 use python:3.10 | ||
# Use Python 3.10 image | ||
FROM python:3.10 | ||
# For Django4 use python:3.9 OR between 3.0 to 3.9 | ||
# FROM python:3.9 | ||
|
||
# Set environment variables | ||
ENV PYTHONDONTWRITEBYTECODE 1 | ||
ENV PYTHONUNBUFFERED 1 | ||
|
||
# Set the working directory to /code | ||
WORKDIR /code | ||
|
||
RUN pip install --upgrade pip | ||
|
||
# Copy the requirements.txt file into the container at /code | ||
COPY requirements.txt /code/ | ||
|
||
# Install any dependencies specified in requirements.txt | ||
RUN pip install --no-cache-dir -r requirements.txt | ||
# RUN pip install -r requirements.txt | ||
RUN pip install -r requirements.txt | ||
|
||
# Copy all files in the current directory to /code | ||
COPY . /code/ | ||
|
||
CMD ["gunicorn", "--bind", "0.0.0.0:8000", "config.wsgi:application"] |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
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,55 @@ | ||
##### Option 1: Adjust System Settings | ||
|
||
## Open the sysctl.conf file: | ||
sudo nano /etc/sysctl.conf | ||
|
||
|
||
|
||
## Add the following line to allow non-root users to bind to port 443: | ||
net.ipv4.ip_unprivileged_port_start=443 | ||
|
||
|
||
## Save the file and exit the editor. | ||
|
||
|
||
## Reload the sysctl configuration: | ||
sudo sysctl -p | ||
|
||
|
||
|
||
##### Option 2: Use Ports Above 1024 | ||
|
||
## Updated docker-compose.yml: | ||
version: '3.9' | ||
services: | ||
web: | ||
build: . | ||
command: sh -c "python manage.py makemigrations && python manage.py migrate && gunicorn myproject.wsgi:application --bind 0.0.0.0:8000" | ||
volumes: | ||
- .:/code | ||
ports: | ||
- "8000:8000" | ||
expose: | ||
- "8000" | ||
env_file: | ||
- .env | ||
nginx: | ||
image: nginx:latest | ||
ports: | ||
- "8080:80" | ||
- "8443:443" | ||
volumes: | ||
- ./nginx/nginx.conf:/etc/nginx/nginx.conf:ro | ||
- ./certs:/etc/nginx/certs:ro | ||
depends_on: | ||
- web | ||
db: | ||
image: postgres:14 | ||
environment: | ||
- "POSTGRES_HOST_AUTH_METHOD=trust" | ||
|
||
docker-compose down | ||
docker-compose up --build | ||
|
||
|
||
|
File renamed without changes.
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
File renamed without changes.
Oops, something went wrong.