Skip to content

Commit 97f9ceb

Browse files
committed
Added .dockerignore files
1 parent 94de7b6 commit 97f9ceb

File tree

6 files changed

+143
-1
lines changed

6 files changed

+143
-1
lines changed

.dockerignore

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# General
2+
.git
3+
.gitignore
4+
.dockerignore
5+
emsdk
6+
Dockerfile
7+
LICENSE
8+
*.md
9+
10+
# Node modules
11+
node_modules
12+
13+
# Logs
14+
logs
15+
npm-debug.log*
16+
17+
# Runtime data
18+
pids
19+
*.pid
20+
*.seed
21+
*.pid.lock
22+
23+
# Directory for instrumented libs generated by jscoverage/JSCover
24+
lib-cov
25+
26+
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
27+
.grunt
28+
29+
# Bower dependency directory (https://bower.io/)
30+
bower_components
31+
32+
# Jekyll metadata folder
33+
.jekyll-metadata
34+
35+
# Dependency directories
36+
jspm_packages/

.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
node_modules
2-
emsdk
2+
# Ignore the Emscripten SDK
3+
emsdk/

MovieVerse-Mobile/.dockerignore

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# General
2+
.git
3+
.gitignore
4+
.dockerignore
5+
emsdk
6+
Dockerfile
7+
LICENSE
8+
*.md
9+
10+
# Node modules
11+
node_modules
12+
13+
# Logs
14+
logs
15+
npm-debug.log*
16+
17+
# Runtime data
18+
pids
19+
*.pid
20+
*.seed
21+
*.pid.lock
22+
23+
# Directory for instrumented libs generated by jscoverage/JSCover
24+
lib-cov
25+
26+
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
27+
.grunt
28+
29+
# Bower dependency directory (https://bower.io/)
30+
bower_components
31+
32+
# Jekyll metadata folder
33+
.jekyll-metadata
34+
35+
# Dependency directories
36+
jspm_packages/

MovieVerse-Mobile/.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,6 @@
2020

2121
# Generated by package manager
2222
node_modules/
23+
24+
# Ignore the Emscripten SDK
25+
emsdk/

MovieVerse-Mobile/Dockerfile

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# ---- Base Node ----
2+
FROM node:14 AS base
3+
WORKDIR /app
4+
COPY package*.json ./
5+
6+
# ---- Dependencies ----
7+
FROM base AS dependencies
8+
RUN npm set progress=false && npm config set depth 0
9+
RUN npm install --only=production
10+
COPY . .
11+
RUN npm run build
12+
13+
# ---- Copy Frontend Artifacts ----
14+
# Separate stage for extracting frontend build artifacts
15+
FROM dependencies AS frontend-artifacts
16+
RUN mkdir -p /app/public
17+
RUN cp -R build/ /app/public/
18+
19+
# ---- Python Base ----
20+
FROM python:3.8 AS python-base
21+
WORKDIR /app
22+
COPY --from=frontend-artifacts /app/public /app/public
23+
COPY backend/requirements.txt /app/
24+
RUN pip install --no-cache-dir -r requirements.txt
25+
26+
# ---- Copy Backend Code ----
27+
FROM python-base AS backend-code
28+
COPY backend /app
29+
30+
# ---- Release with Gunicorn ----
31+
FROM backend-code AS release
32+
# Set environment variables
33+
ENV PYTHONUNBUFFERED=1 \
34+
PYTHONDONTWRITEBYTECODE=1 \
35+
PATH="/app:${PATH}"
36+
37+
# Expose port for the backend
38+
EXPOSE 8080
39+
40+
# Start Gunicorn (adjust the number of workers and threads as necessary)
41+
CMD ["gunicorn", "--bind", "0.0.0.0:8080", "--workers", "3", "--threads", "3", "myproject.wsgi:application"]
42+
CMD ["python", "manage.py", "runserver"]
43+
CMD ["python", "manage.py", "collectstatic", "--noinput"]
44+
CMD ["python", "manage.py", "migrate"]
45+
CMD ["python", "manage.py", "createsuperuser"]

MovieVerse-Mobile/LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2023 Son Nguyen Hoang
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

0 commit comments

Comments
 (0)