Skip to content

Commit

Permalink
Containerized routes microservice
Browse files Browse the repository at this point in the history
  • Loading branch information
vliu36 committed Dec 3, 2023
1 parent ee0d842 commit 8ac20b9
Show file tree
Hide file tree
Showing 4 changed files with 1,105 additions and 5 deletions.
7 changes: 7 additions & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@ services:
env_file: "src/account/.env"
dns:
- "8.8.8.8"
routes:
build: "src/routes/"
command: "npx ts-node github.ts"
ports:
- "4000:4000"
- "8080:8080"
env_file: "src/routes/.env"
# client:
# build: "client/"
# command: "npm start"
Expand Down
12 changes: 7 additions & 5 deletions src/routes/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
FROM node:latest

WORKDIR /
COPY github.ts/
COPY routes.ts/
RUN npm install

# Copies files from the routes directory
COPY ["github.ts", "routes.ts", "/routes"]

# Runs npm install using bash shell
RUN ["/bin/bash", "-c", "npm install"]

# Port 4000 is the server port, 8080 is the cors-anywhere port
EXPOSE 4000 8080

# Runs the
CMD ["npx", "ts-node", "routes.ts"]
CMD ["npx", "ts-node", "github.ts"]
Loading

0 comments on commit 8ac20b9

Please sign in to comment.