This repository has been archived by the owner on Dec 31, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from hardingadonis/vuong_setup_docker
Vương: Setup Docker
- Loading branch information
Showing
3 changed files
with
50 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"] |