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 0b8a31d commit e051685
Show file tree
Hide file tree
Showing 96 changed files with 40 additions and 15 deletions.
3 changes: 1 addition & 2 deletions .env.dev
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ 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"
WEB_DOMAIN="http://localhost:8000"

## Database
MARIADB_DATABASE="perpustakaan"
Expand Down
13 changes: 1 addition & 12 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,13 +1,2 @@
_tmpdb
*.log
*.pot
*.pyc
perpus/__pycache__
perpus/migrations/__pycache__
node_modules
web/dist
collectedstatic
perpus-env
.venv
.env
static
.env
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)

Wait.... don't

##### 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

0 comments on commit e051685

Please sign in to comment.