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

made by me #217

Open
wants to merge 5 commits into
base: containers
Choose a base branch
from
Open
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
14 changes: 14 additions & 0 deletions Docker-files/app/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
FROM openjdk:11 AS BUILD_IMAGE
LABEL "project"="vprofile"
LABEL "Author"="Junaid"
RUN apt update && apt install maven -y
RUN git clone https://github.com/devopshydclub/vprofile-project.git
RUN cd vprofile-project && git checkout docker && mvn install

FROM tomcat:9-jre11
LABEL "project"="vprofile"
LABEL "Author"="Junaid"
RUN rm -rf /usr/local/tomcat/webapps/*
COPY --from=BUILD_IMAGE vprofile-project/target/vprofile-v2.war /usr/local/tomcat/webapps/ROOT.war
EXPOSE 8080
CMD ["catalina.sh", "run"]
8 changes: 8 additions & 0 deletions Docker-files/db/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
FROM mysql:8.0.33
LABEL "Project"="Vprofile"
LABEL Authore="Junaid"

ENV MYSQL_ROOT_PASSWORD="vprodbpass"
ENV MUSQL_DATABASE="accounts"

ADD db_backup.sql docker-entrypoint-initdb.d/db_backup.sql
6 changes: 6 additions & 0 deletions Docker-files/web/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
FROM nginx
LABEL "Project"="Vprofile"
LABEL "Authore"="junaid"

RUN rm -rf /etc/nginx/conf.d/defaults.conf
COPY nginvproapp.conf /etc/nginx/conf.d/vproapp.conf
45 changes: 45 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
version: '3.8'
services:
vprodb:
build:
context: ./Docker-files/db
image: junaid121/vprofiledb
container_name: vprodb
ports:
- "3306:3306"
volumes:
- vprodbdata:/var/lib/mysql
environment:
- MYSQL_ROOT_PASSWORD=vprodbpass
vprocache01:
image: memcached
ports:
- "11211:11211"
vpromq01:
image: rabbitmq
ports:
- "15672:15672"
environment:
- RABBITMQ_DEFAULT_USER=guest
- RABBITMQ_DEFAULT_PASS=guest

vproapp:
build:
context: ./Docker-files/app
image: junaid121/vprofileapp
container_name: vproapp
ports:
- "8080:8080"
volumes:
- vproappdata:/usr/local/tomcat/webapps

vproweb:
build:
context: ./Docker-files/web
image: junaid121/vprofileweb
container_name: vproweb
ports:
- "80:80"
volumes:
vprodbdata: {}
vproappdata: {}