Skip to content

Commit

Permalink
Changes on docker-compose file
Browse files Browse the repository at this point in the history
  • Loading branch information
UO287687 committed Feb 21, 2024
1 parent bcba025 commit 178c7f1
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 1 deletion.
12 changes: 12 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,16 @@ services:
environment:
MONGODB_URI: mongodb://mongodb:27017/userdb

questiongenerationservice:
container_name: questiongenerationservice-${teamname:-defaultASW}
image: ghcr.io/arquisoft/wiq_es3b/questiongenerationservice:latest
profiles: ["dev", "prod"]
build: ./question_generator
ports:
- "8003:8003"
networks:
- mynetwork

gatewayservice:
container_name: gatewayservice-${teamname:-defaultASW}
image: ghcr.io/arquisoft/wiq_es3b/gatewayservice:latest
Expand All @@ -48,13 +58,15 @@ services:
- mongodb
- userservice
- authservice
- questiongenerationservice
ports:
- "8000:8000"
networks:
- mynetwork
environment:
AUTH_SERVICE_URL: http://authservice:8002
USER_SERVICE_URL: http://userservice:8001
QUESTION_GENERATION_SERVICE_URL: http://questiongenerationservice:8003

webapp:
container_name: webapp-${teamname:-defaultASW}
Expand Down
20 changes: 20 additions & 0 deletions question_generator/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Use an official Node.js runtime as a parent image
FROM node:20

# Set the working directory in the container
WORKDIR /usr/src/questionservice

# Copy package.json and package-lock.json to the working directory
COPY package*.json ./

# Install app dependencies
RUN npm install

# Copy the app source code to the working directory
COPY . .

# Expose the port the app runs on
EXPOSE 8003

# Define the command to run your app
CMD ["node", "questionService.js"]
2 changes: 1 addition & 1 deletion question_generator/questionService.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const planetTemplate=require('./planets/planetsTemplates');
const generalTemplate=require('./questionTemplate')

const app = express();
const port = 8002;
const port = 8003;

app.use(bodyParser.json());

Expand Down

0 comments on commit 178c7f1

Please sign in to comment.