Skip to content

Commit

Permalink
Added Dockerfile and docker-compose.yml
Browse files Browse the repository at this point in the history
I have added dockerfile which will make containerization easy for both developers and users to get the project up and running in any environment.

Signed-off-by: Shrish Mishra [email protected]
  • Loading branch information
Dedsec0098 committed Jan 18, 2025
1 parent 53497a3 commit e6762e8
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
11 changes: 11 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM python:3.10-slim

WORKDIR /app

COPY . .

RUN pip install --no-cache-dir -r requirements.txt

EXPOSE 8000

CMD ["python", "about.py"]
27 changes: 27 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
version: "3.8"

services:
aboutcode:
build:
context: .
container_name: aboutcode-container
ports:
- "8000:8000"
volumes:
- .:/app
depends_on:
- db
command: python about.py

db:
image: postgres:14
container_name: aboutcode-db
environment:
POSTGRES_USER: user
POSTGRES_PASSWORD: password
POSTGRES_DB: aboutcode
volumes:
- db_data:/var/lib/postgresql/data

volumes:
db_data:

0 comments on commit e6762e8

Please sign in to comment.