-
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.
feat(deployement): production environment
- Loading branch information
Showing
17 changed files
with
258 additions
and
104 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,20 @@ | ||
PUID=1000 | ||
PGID=1000 | ||
TZ=Europe/Brussels | ||
|
||
DATADIR=./data | ||
|
||
BACKEND_DIR=./backend | ||
|
||
FRONTEND_DIR=./frontend | ||
|
||
REDIS_IP=192.168.90.10 | ||
REDIS_PORT=6379 | ||
|
||
DJANGO_SECRET_KEY= | ||
DJANGO_DEBUG=True | ||
DJANGO_DB_ENGINE=django.db.backends.sqlite3 | ||
DJANGO_DB_NAME=${BACKEND_DIR}/db.sqlite3 | ||
DJANGO_REDIS_HOST=${REDIS_IP} | ||
DJANGO_REDIS_PORT=${REDIS_PORT} | ||
DJANGO_REDIS_PASSWORD=${REDIS_PASSWORD} |
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,5 @@ | ||
.tool-versions | ||
.env | ||
data/* | ||
|
||
!data/nginx/nginx.conf | ||
|
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,30 @@ | ||
PUID=1000 | ||
PGID=1000 | ||
TZ=Europe/Brussels | ||
|
||
DATADIR=./data | ||
|
||
BACKEND_DIR=./backend | ||
|
||
FRONTEND_DIR=./frontend | ||
|
||
POSTGRES_IP=192.168.90.9 | ||
POSTGRES_PORT=5432 | ||
POSTGRES_DB=selab | ||
POSTGRES_USER=selab_user | ||
POSTGRES_PASSWORD= | ||
|
||
REDIS_IP=192.168.90.10 | ||
REDIS_PORT=6379 | ||
|
||
DJANGO_SECRET_KEY= | ||
DJANGO_DEBUG=false | ||
DJANGO_DB_ENGINE=django.db.backends.postgresql | ||
DJANGO_DB_NAME=${POSTGRES_DB} | ||
DJANGO_DB_USER=${POSTGRES_USER} | ||
DJANGO_DB_PASSWORD=${POSTGRES_PASSWORD} | ||
DJANGO_DB_HOST=${POSTGRES_IP} | ||
DJANGO_DB_PORT=${POSTGRES_PORT} | ||
DJANGO_REDIS_HOST=${REDIS_IP} | ||
DJANGO_REDIS_PORT=${REDIS_PORT} | ||
DJANGO_REDIS_PASSWORD=${REDIS_PASSWORD} |
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,15 @@ | ||
FROM python:3.11.4 | ||
|
||
RUN apt update && apt install -y gettext libgettextpo-dev && pip install --upgrade pip | ||
|
||
WORKDIR /code | ||
|
||
ENV PYTHONDONTWRITEBYTECODE=1 | ||
ENV PYTHONUNBUFFERED=1 | ||
|
||
COPY requirements.txt . | ||
RUN pip install --no-cache-dir -r requirements.txt | ||
|
||
COPY . . | ||
|
||
RUN ./setup.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,4 @@ | ||
workers = 4 | ||
bind = "0.0.0.0:8080" | ||
chdir = "/code/" | ||
module = "ypovoli.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
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 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
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,12 @@ | ||
FROM node:16 as build-stage | ||
WORKDIR /app | ||
COPY package*.json ./ | ||
RUN npm install | ||
COPY ./ . | ||
RUN npm run build | ||
|
||
FROM nginx as production-stage | ||
EXPOSE 3000 | ||
RUN mkdir /app | ||
COPY nginx.conf /etc/nginx/conf.d/default.conf | ||
COPY --from=build-stage /app/dist /app |
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,9 @@ | ||
server { | ||
listen 3000; | ||
|
||
location / { | ||
root /app; | ||
index index.html index.htm; | ||
try_files $uri $uri/ /index.html; | ||
} | ||
} |
Oops, something went wrong.