Skip to content
This repository has been archived by the owner on Dec 31, 2023. It is now read-only.

Commit

Permalink
Merge pull request #1 from hardingadonis/vuong_setup_docker
Browse files Browse the repository at this point in the history
Vương: Setup Docker
  • Loading branch information
hardingadonis authored Nov 16, 2023
2 parents b8978e5 + e807ee7 commit 5b8aa6c
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 0 deletions.
19 changes: 19 additions & 0 deletions database/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
FROM mysql:8.1.0

LABEL org.opencontainers.image.source=https://github.com/hardingadonis/miu-shop
LABEL org.opencontainers.image.description="Container that runs MySQL for Miu Shop"
LABEL org.opencontainers.image.licenses=Apache-2.0

LABEL [email protected]

# Copy the database schema to the container
COPY ./setup.sql /docker-entrypoint-initdb.d/setup.sql

# Set the empty password for the root user
ENV MYSQL_ALLOW_EMPTY_PASSWORD yes

# Set the default database name
ENV MYSQL_DATABASE=miu

# Set the default port
EXPOSE 3306
14 changes: 14 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
version: '3'

services:
database:
image: ghcr.io/hardingadonis/miu-shop-database:1.0.0
ports:
- "3306:3306"

server:
image: ghcr.io/hardingadonis/miu-shop-server:1.0.0
ports:
- "8080:8080"
depends_on:
- database
17 changes: 17 additions & 0 deletions server/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
FROM tomcat:8.5-jre8

LABEL org.opencontainers.image.source=https://github.com/hardingadonis/miu-shop
LABEL org.opencontainers.image.description="Container that runs Tomcat for Miu Shop"
LABEL org.opencontainers.image.licenses=Apache-2.0

LABEL [email protected]
LABEL [email protected]

# Copy the war file to the container
COPY ./*.war /usr/local/tomcat/webapps/miu.war

# Set the default port
EXPOSE 8080

# Set the default command
CMD ["catalina.sh", "run"]

0 comments on commit 5b8aa6c

Please sign in to comment.