Skip to content

Commit 4686b00

Browse files
committed
ocker Compose, Django, and Create React App Implementation
1 parent e26a137 commit 4686b00

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+13884
-0
lines changed

.gitignore

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2+
3+
# dependencies
4+
node_modules
5+
.pnp
6+
.pnp.js
7+
8+
# testing
9+
coverage
10+
11+
# production
12+
build
13+
14+
# misc
15+
.DS_Store
16+
.env.local
17+
.env.development.local
18+
.env.test.local
19+
.env.production.local
20+
21+
npm-debug.log*
22+
yarn-debug.log*
23+
yarn-error.log*
24+
25+
venv/

backend/Dockerfile

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Use an official Python runtime as a parent image
2+
FROM python:3.6
3+
4+
# Adding backend directory to make absolute filepaths consistent across services
5+
WORKDIR /app/backend
6+
7+
# Install Python dependencies
8+
COPY requirements.txt /app/backend
9+
RUN pip3 install --upgrade pip -r requirements.txt
10+
11+
# Add the rest of the code
12+
COPY . /app/backend
13+
14+
# Make port 8000 available for the app
15+
EXPOSE 8000
16+
17+
# Be sure to use 0.0.0.0 for the host within the Docker container,
18+
# otherwise the browser won't be able to find it
19+
CMD python3 /app/backend/manage.py runserver 0.0.0.0:8000

backend/db.sqlite3

144 KB
Binary file not shown.

backend/manage.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#!/usr/bin/env python
2+
"""Django's command-line utility for administrative tasks."""
3+
import os
4+
import sys
5+
6+
7+
def main():
8+
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'rating_api.settings')
9+
try:
10+
from django.core.management import execute_from_command_line
11+
except ImportError as exc:
12+
raise ImportError(
13+
"Couldn't import Django. Are you sure it's installed and "
14+
"available on your PYTHONPATH environment variable? Did you "
15+
"forget to activate a virtual environment?"
16+
) from exc
17+
execute_from_command_line(sys.argv)
18+
19+
20+
if __name__ == '__main__':
21+
main()

backend/rating/__init__.py

Whitespace-only changes.
114 Bytes
Binary file not shown.
227 Bytes
Binary file not shown.
581 Bytes
Binary file not shown.
Binary file not shown.
285 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy