Skip to content

Commit 983d732

Browse files
Complete repository reorganization with Docker support and documentation
Co-authored-by: nithinmohantk <[email protected]>
1 parent adbaac9 commit 983d732

File tree

5 files changed

+44
-4
lines changed

5 files changed

+44
-4
lines changed

.github/workflows/udacity-c2-basic-server.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
node-version: ${{ matrix.node-version }}
2727
- run: cd src/exercises/udacity-c2-basic-server/
2828
- run: cd src/exercises/udacity-c2-basic-server/ && npm ci
29-
- run: cd src/exercises/udacity-c2-basic-server/ && npm run build --if-present
29+
- run: cd src/exercises/udacity-c2-basic-server/ && npm run tsc --if-present
3030
# - run: cd src/exercises/udacity-c2-basic-server/ && npm test
3131
env:
3232
CI: true

.github/workflows/udacity-c2-restapi.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
node-version: ${{ matrix.node-version }}
2727
- run: cd src/exercises/udacity-c2-restapi/
2828
- run: cd src/exercises/udacity-c2-restapi/ && npm ci
29-
- run: cd src/exercises/udacity-c2-restapi/ && npm run build --if-present
29+
- run: cd src/exercises/udacity-c2-restapi/ && npm run tsc --if-present
3030
#- run: cd src/exercises/udacity-c2-restapi/ && npm test
3131
env:
3232
CI: true

DOCKER.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Docker Usage
2+
3+
This repository includes Docker support for building and running the various projects.
4+
5+
## Building a Docker Image
6+
7+
To build a Docker image for a specific project, use the following command from the root directory:
8+
9+
```bash
10+
# Build image for the image filter project
11+
docker build --build-arg PROJECT_PATH=src/project/image-filter-udagram-app -t udacity-image-filter .
12+
13+
# Build image for microservices frontend
14+
docker build --build-arg PROJECT_PATH=src/project/c2-microservices-v1/udacity-c2-frontend -t udacity-c2-frontend .
15+
16+
# Build image for microservices REST API feed service
17+
docker build --build-arg PROJECT_PATH=src/project/c2-microservices-v1/udacity-c2-restapi-feed -t udacity-c2-restapi-feed .
18+
```
19+
20+
## Running a Docker Container
21+
22+
After building an image, run it with:
23+
24+
```bash
25+
docker run -p 8080:8080 udacity-image-filter
26+
```
27+
28+
## GitHub Actions
29+
30+
The repository includes GitHub Actions workflows that automatically build and publish Docker images to GitHub Container Registry when code is pushed to main branches.
31+
32+
### Available Images
33+
34+
- `ghcr.io/nithinmohantk/udacity-aws-developer-project-workspace/image-filter-udagram`
35+
- `ghcr.io/nithinmohantk/udacity-aws-developer-project-workspace/udacity-c2-frontend`
36+
- `ghcr.io/nithinmohantk/udacity-aws-developer-project-workspace/udacity-c2-restapi-feed`
37+
- `ghcr.io/nithinmohantk/udacity-aws-developer-project-workspace/udacity-c2-restapi-user`
38+
39+
Images are tagged with branch names, semantic versions, and SHA hashes.

Dockerfile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@ WORKDIR /usr/src/app
2020

2121
# Copy the entire src directory
2222
COPY src/ ./src/
23-
COPY package*.json ./
24-
COPY README.md LICENSE ./
2523

2624
# Set the project path as build argument
2725
ARG PROJECT_PATH

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,9 @@ npm install
7878
## Usage
7979
You can use the source code in repository under MIT License without any warranty or support. Free to use, without any royalty.
8080

81+
## Docker Support
82+
This repository includes Docker support for containerizing the various projects. See [DOCKER.md](DOCKER.md) for detailed instructions on building and running Docker images.
83+
8184
## Completion Certificate
8285
![Completion Cert](images/certificate.png)
8386

0 commit comments

Comments
 (0)