Skip to content

Commit abbbfcd

Browse files
committed
feat: setup front and back foundation
1 parent ecdbb82 commit abbbfcd

25 files changed

Lines changed: 424 additions & 14 deletions

.dockerignore

Lines changed: 0 additions & 4 deletions
This file was deleted.

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
venv/
1+
.venv/
2+
src/frontend/node_modules/

README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
# Python Image Practice on Docker
2-
- Successfully setup the Dockerfile
1+
# Multi Image Practice on Docker
2+
- Successfully setup the Dockerfiles
33
- Practiced docker layer caching
44
- Implemented python virtual environment & package handling
5+
- Setup the foundation for front & backend
56

67
## To Implement
7-
- Docker Bind Mounting for DX
8+
- FastAPI Server via Uvicorn*
89
- Port Forwarding for FastAPI Server
9-
- Unit Tests for TDD Practice
10+
- Unit Tests for TDD Practice using Pytest
File renamed without changes.

src/backend/.dockerignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+

Dockerfile renamed to src/backend/Dockerfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
# Use python as base image (uses Debian as its foundation)
1+
# Use python as base image (uses Debian as its foundation) FROM python@sha256:d13fa0424035d290decef3d575cea23d1b7d5952cdf429df8f5542c71e961576
22
FROM python@sha256:d13fa0424035d290decef3d575cea23d1b7d5952cdf429df8f5542c71e961576
33

44
# Set environment variables to be used
55
ENV PYTHONUNBUFFERED=1
6-
ENV APP_USER=cypher
7-
ENV APP_GROUP=app
6+
ENV APP_USER=client
7+
ENV APP_GROUP=backend
88

99
# Add a system user for non-root access
1010
RUN groupadd -r ${APP_GROUP} && useradd -r -g ${APP_GROUP} ${APP_USER}
@@ -27,4 +27,4 @@ USER ${APP_USER}
2727

2828
# Run the app
2929
ENTRYPOINT ["python3"]
30-
CMD ["./src/main.py"]
30+
CMD ["main.py"]

src/backend/__init__.py

Whitespace-only changes.

src/main.py renamed to src/backend/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
def main():
2-
print("Hello from Docker!")
2+
print("Hello from the FastAPI Backend!")
33

44

55
if __name__ == "__main__":

src/frontend/.dockerignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
README.md
2+
node_modules/

0 commit comments

Comments
 (0)