Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Service question generator #52

Merged
merged 11 commits into from
Mar 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,17 @@ services:
networks:
- mynetwork

mongodb_wiki:
container_name: mongodb-wiki-${teamname:-defaultASW}
image: mongo
profiles: ["dev", "prod"]
volumes:
- mongodb_wiki_data:/data/db
ports:
- "27018:27017"
networks:
- mynetwork

authservice:
container_name: authservice-${teamname:-defaultASW}
image: ghcr.io/arquisoft/wiq_es6c/authservice:latest
Expand Down Expand Up @@ -39,6 +50,22 @@ services:
environment:
MONGODB_URI: mongodb://mongodb:27017/userdb

questiongeneratorservice:
container_name: questiongeneratorservice-${teamname:-defaultASW}
image: ghcr.io/arquisoft/wiq_es6c/questiongeneratorservice:latest
profiles: ["dev", "prod"]
build: ./questionsservice/questiongeneratorservice
depends_on:
- mongodb_wiki
- storequestionservice
ports:
- "8007:8006"
networks:
- mynetwork
environment:
MONGODB_URI: mongodb://mongodb_wiki:27017/questions
STORE_QUESTION_SERVICE_URL: http://storequestionservice:8004

gatewayservice:
container_name: gatewayservice-${teamname:-defaultASW}
image: ghcr.io/arquisoft/wiq_es6c/gatewayservice:latest
Expand Down Expand Up @@ -117,6 +144,7 @@ services:

volumes:
mongodb_data:
mongodb_wiki_data:
prometheus_data:
grafana_data:

Expand Down
20 changes: 20 additions & 0 deletions questionsservice/questiongeneratorservice/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/questionsservice/questiongeneratorservice

# 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 8006

# Define the command to run your app
CMD ["node", "questiongenerator-service.js"]
Loading