Skip to content

Commit

Permalink
modify directory for Dockerizing
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmadhabibi14 committed Jan 31, 2024
1 parent 415acd5 commit a25a754
Show file tree
Hide file tree
Showing 97 changed files with 73 additions and 14 deletions.
17 changes: 17 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
## Web Configuration
WEB_ENV="dev" # dev, prod
WEB_PORT=8000
WEB_HOST="127.0.0.1"
WEB_DEBUG=true
WEB_DOMAIN="https://bacaku.my.id"
WEB_DOMAIN_DEV="http://localhost:8000"

## Database
MARIADB_DATABASE="perpustakaan"
MARIADB_USER="perpus"
MARIADB_PASSWORD="perpus123"
MARIADB_ROOT_PASSWORD="rootpass"
MARIADB_HOST="127.0.0.1"
MARIADB_PORT="3306"

SECRET_KEY="django-insecure-_w3igt4)kvso#_)9cq3-daz!@8xobw55jdk=x((m1h#5lwd2z-"
14 changes: 1 addition & 13 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,13 +1 @@
_tmpdb
*.log
*.pot
*.pyc
perpus/__pycache__
perpus/migrations/__pycache__
node_modules
web/dist
collectedstatic
perpus-env
.venv
.env
static
_tmpdb
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

![My Dotties](/web/assets/img/Cover.png)

Btw, wait...

##### Connect Docker
```shell
docker-compose up -d
Expand Down
File renamed without changes.
13 changes: 13 additions & 0 deletions app/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
_tmpdb
*.log
*.pot
*.pyc
perpus/__pycache__
perpus/migrations/__pycache__
node_modules
web/dist
collectedstatic
perpus-env
.venv
.env
static
11 changes: 11 additions & 0 deletions app/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM python:3.11.4-slim-buster

WORKDIR /usr/src/app

ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1

RUN pip install --upgrade pip
COPY ./requirements.txt .

COPY . .
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
13 changes: 12 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
version: "3.2"
version: "3.8"

services:
web:
build: ./app
command: python3 manage.py runserver 0.0.0.0:8000
volumes:
- ./app/:/usr/src/app
ports:
- 8000:8000
env_file:
- ./.env
depends_on:
- db

db:
image: mariadb
Expand Down
17 changes: 17 additions & 0 deletions scripts/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
## Web Configuration
WEB_ENV="dev" # dev, prod
WEB_PORT=8000
WEB_HOST="127.0.0.1"
WEB_DEBUG=true
WEB_DOMAIN="https://bacaku.my.id"
WEB_DOMAIN_DEV="http://localhost:8000"

## Database
MARIADB_DATABASE="perpustakaan"
MARIADB_USER="perpus"
MARIADB_PASSWORD="perpus123"
MARIADB_ROOT_PASSWORD="rootpass"
MARIADB_HOST="127.0.0.1"
MARIADB_PORT="3306"

SECRET_KEY="django-insecure-_w3igt4)kvso#_)9cq3-daz!@8xobw55jdk=x((m1h#5lwd2z-"

0 comments on commit a25a754

Please sign in to comment.