Skip to content

Commit

Permalink
feat : updated Dockerfile-11
Browse files Browse the repository at this point in the history
  • Loading branch information
surjendu104 committed Feb 13, 2024
1 parent 52cad79 commit face204
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,6 @@ RUN apt-get update && \

EXPOSE 27017 8080
ADD target/url-shortener-images.jar url-shortener-images.jar
ENTRYPOINT ["mongod", "--fork", "--logpath", "/var/log/mongodb/mongod.log", ";", "java", "-jar", "/url-shortener-images.jar"]
RUN apt-get update && apt-get install -y supervisor
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/supervisord.conf"]
8 changes: 8 additions & 0 deletions supervisord.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[supervisord]
nodaemon=true

[program:mongod]
command=/usr/bin/mongod --fork --logpath /var/log/mongodb/mongod.log

[program:java-app]
command=/usr/bin/java -jar /url-shortener-images.jar

0 comments on commit face204

Please sign in to comment.