-
Notifications
You must be signed in to change notification settings - Fork 2
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 #220 from fleizean/spa
Spa
- Loading branch information
Showing
26 changed files
with
145 additions
and
229 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 @@ | ||
zort |
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 |
---|---|---|
|
@@ -10,6 +10,7 @@ local_settings.py | |
db.sqlite3 | ||
db.sqlite3-journal | ||
media | ||
staticfiles | ||
migrations/ | ||
0001_initial.py | ||
|
||
|
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,22 @@ | ||
# Dockerfile | ||
FROM python:3.11.4-slim-buster | ||
|
||
ENV PIP_ROOT_USER_ACTION=ignore \ | ||
PYTHONUNBUFFERED=1 \ | ||
PYTHONDONTWRITEBYTECODE=1 | ||
#PIP_NO_CACHE_DIR=off | ||
|
||
|
||
WORKDIR /ft_transcendence | ||
|
||
COPY indianpong /ft_transcendence/ | ||
|
||
RUN pip install --upgrade pip && pip install -r requirements.txt | ||
|
||
RUN chmod +x start.sh | ||
|
||
EXPOSE 8001 | ||
|
||
CMD [ "bash", "start.sh" ] | ||
|
||
|
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,17 @@ | ||
FROM nginx | ||
|
||
# Create a directory for the certificates | ||
RUN mkdir -p /ssl_data && mkdir -p /etc/nginx/ssl | ||
|
||
# Generate a self-signed certificate | ||
RUN openssl req -x509 -newkey rsa:4096 -keyout /ssl_data/key.pem -out /ssl_data/cert.pem -days 365 -nodes -subj '/CN=localhost' | ||
|
||
# Copy the certificates to the Nginx directory | ||
RUN cp /ssl_data/key.pem /etc/nginx/ssl/key.pem && cp /ssl_data/cert.pem /etc/nginx/ssl/cert.pem | ||
|
||
# Copy the Nginx configuration file | ||
COPY nginx.conf /etc/nginx/nginx.conf | ||
|
||
# Expose the Nginx port | ||
EXPOSE 8000 | ||
EXPOSE 8443 |
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,45 @@ | ||
# docker-compose.yaml | ||
version: '3.9' | ||
|
||
services: | ||
db: | ||
image: postgres:13 | ||
restart: always | ||
ports: | ||
- "5432:5432" | ||
env_file: | ||
- .env | ||
|
||
web: | ||
build: | ||
context: . | ||
dockerfile: Dockerfile | ||
volumes: | ||
- staticfiles:/ft_transcendence/staticfiles | ||
- media:/ft_transcendence/media | ||
- ssl_data:/ssl_data | ||
env_file: | ||
- .env | ||
ports: | ||
- 8001:8001 | ||
depends_on: | ||
- db | ||
|
||
nginx: | ||
build: | ||
context: . | ||
dockerfile: Dockerfile.nginx | ||
volumes: | ||
- staticfiles:/ft_transcendence/staticfiles | ||
- media:/ft_transcendence/media | ||
- ssl_data:/ssl_data | ||
ports: | ||
- 8000:8000 | ||
- 8443:8443 | ||
depends_on: | ||
- web | ||
|
||
volumes: | ||
staticfiles: | ||
media: | ||
ssl_data: |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
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
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
Oops, something went wrong.