-
Notifications
You must be signed in to change notification settings - Fork 27
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 #96 from anjana-somathilake/master
Dockerfile and docker composer added
- Loading branch information
Showing
3 changed files
with
66 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,5 @@ | ||
FROM frolvlad/alpine-java:jre8-slim | ||
EXPOSE 8000 | ||
COPY target/covid19-1.0.0-SNAPSHOT/*.* ./ | ||
ENTRYPOINT ["java","-jar","covid19.jar"] | ||
|
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,53 @@ | ||
version: "2.1" | ||
|
||
volumes: | ||
files: | ||
driver: local | ||
mysql: | ||
driver: local | ||
backup: | ||
driver: local | ||
|
||
services: | ||
covid19-service: | ||
build: ./ | ||
expose: | ||
- "8000" | ||
restart: always | ||
ports: | ||
- 8000:8000 | ||
depends_on: | ||
- db | ||
environment: | ||
- COVID19_SERVICE_DOMAIN="localhost" | ||
healthcheck: | ||
test: ["CMD", "/usr/bin/healthcheck"] | ||
interval: 30s | ||
timeout: 10s | ||
retries: 5 | ||
volumes: | ||
- files:/mnt/data | ||
|
||
db: | ||
image: webhippie/mariadb:latest | ||
restart: always | ||
expose: | ||
- "3306" | ||
ports: | ||
- 3306:3306 | ||
environment: | ||
- MARIADB_ROOT_PASSWORD=root | ||
- MARIADB_USERNAME=root | ||
- MARIADB_PASSWORD=root | ||
- MARIADB_DATABASE=covid19_db | ||
- MARIADB_MAX_ALLOWED_PACKET=128M | ||
- MARIADB_INNODB_LOG_FILE_SIZE=64M | ||
healthcheck: | ||
test: ["CMD", "/usr/bin/mysql --user=root --password=root--execute \"SHOW DATABASES;\""] | ||
interval: 30s | ||
timeout: 10s | ||
retries: 5 | ||
volumes: | ||
- mysql:/var/lib/mysql | ||
- backup:/var/lib/backup | ||
|
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