-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Docker on windows
- Loading branch information
Showing
3 changed files
with
202 additions
and
40 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
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
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,156 @@ | ||
version: "2.4" | ||
|
||
services: | ||
# in such context the database will not have enough memory, http://www.teamfoundation.co.za/2018/05/07/docker-linux-and-windows-event-more-3-from-containers-lcow/ | ||
database: | ||
platform: windows | ||
container_name: openimis-db | ||
build: | ||
context: ../../openimis-db_dkr | ||
dockerfile: Dockerfile_win | ||
args: | ||
- ACCEPT_EULA=${ACCEPT_EULA} | ||
- SA_PASSWORD=${DB_PASSWORD} | ||
- SQL_SCRIPT_URL=${DB_SQL_SCRIPT} | ||
environment: | ||
- ACCEPT_EULA=${ACCEPT_EULA} | ||
- SA_PASSWORD=${DB_PASSWORD} | ||
- SQL_SCRIPT_URL=${DB_SQL_SCRIPT} | ||
- DB_NAME=${DB_NAME} | ||
- DB_USER=${DB_USER} | ||
networks: | ||
- openimis-net | ||
healthcheck: | ||
test: ["CMD","sqlcmd","-U","$DB_USER","-P","$DB_PASSWORD","-d","$DB_NAME","-Q","SELECT 1"] | ||
interval: 30s | ||
## WARNING: | ||
## exposing the database port outside the openimis-net network | ||
## may lead to security issue (depending on your network topology) | ||
ports: | ||
- 1433:1433 | ||
backend: | ||
platform: windows | ||
container_name: openimis-backend | ||
build: | ||
context: ../../openimis-be_py | ||
dockerfile: Dockerfile_win | ||
command: start | ||
environment: | ||
- DB_HOST=${DB_HOST} | ||
- DB_PORT=${DB_PORT} | ||
- DB_NAME=${DB_NAME} | ||
- DB_USER=${DB_USER} | ||
- DB_PASSWORD=${DB_PASSWORD} | ||
- REMOTE_USER_AUTHENTICATION=True | ||
- SITE_ROOT=api | ||
networks: | ||
- openimis-net | ||
depends_on: | ||
database: | ||
condition: service_healthy | ||
ibackend: | ||
condition: service_healthy | ||
healthcheck: | ||
test: ["CMD","powershell","-Command","/openimis-be/script/healthcheck.ps1"] | ||
interval: 1m | ||
timeout: 5m | ||
## WARNING: | ||
## exposing the backend port outside the openimis-net network | ||
## may lead to security issue (depending on your network topology) | ||
# ports: | ||
# - 8000:8000 | ||
## OPTION: | ||
## if you want to ensure the (demo) db is started prior to backend, | ||
## simply add the following dependency | ||
# depends_on: | ||
# - db | ||
# frontend: | ||
# platform: windows | ||
# container_name: openimis-frontend | ||
# build: | ||
# context: ../../openimis-fe_js | ||
# dockerfile: Dockerfile_win | ||
# command: C:\\Users\\ContainerAdministrator\\AppData\\Local\\Yarn\\bin\\serve -s build | ||
# environment: | ||
# - REACT_APP_API_URL=/iapi | ||
# networks: | ||
# - openimis-net | ||
## WARNING: | ||
## exposing the frontend port outside the openimis-net network | ||
## may lead to security issue (depending on your network topology) | ||
# ports: | ||
# - 5000:5000 | ||
ibackend: | ||
platform: windows | ||
container_name: openimis-ibackend | ||
build: | ||
context: ../../openimis-be_py | ||
dockerfile: Dockerfile_win | ||
command: start | ||
environment: | ||
- DB_HOST=${DB_HOST} | ||
- DB_PORT=${DB_PORT} | ||
- DB_NAME=${DB_NAME} | ||
- DB_USER=${DB_USER} | ||
- DB_PASSWORD=${DB_PASSWORD} | ||
- REMOTE_USER_AUTHENTICATION=True | ||
- SITE_ROOT=iapi | ||
networks: | ||
- openimis-net | ||
ports: | ||
- 8000:8000 | ||
depends_on: | ||
database: | ||
condition: service_healthy | ||
healthcheck: | ||
test: ["CMD","powershell","-Command","c:/openimis-be/script/healthcheck.ps1"] | ||
interval: 1m | ||
timeout: 5m | ||
gateway: | ||
platform: windows | ||
container_name: openimis-gateway | ||
build: | ||
context: ../../openimis-gateway_dkr | ||
dockerfile: Dockerfile_win | ||
shm_size: '4gb' | ||
environment: | ||
- NEW_OPENIMIS_HOST=${NEW_OPENIMIS_HOST} | ||
- LEGACY_OPENIMIS_HOST=${LEGACY_OPENIMIS_HOST} | ||
# command: | ||
networks: | ||
- openimis-net | ||
ports: | ||
- 80:80 | ||
- 443:443 | ||
depends_on: | ||
backend: | ||
condition: service_healthy | ||
frontend: | ||
condition: service_started | ||
ibackend: | ||
condition: service_healthy | ||
|
||
# volumes: | ||
# - C:/Users/delcpa/Development/openimis-fe_js/conf:c:/openresty/conf | ||
frontend: | ||
platform: windows | ||
container_name: openimis-frontend | ||
build: | ||
context: ../../openimis-fe_js | ||
dockerfile: Dockerfile_win | ||
shm_size: '4gb' | ||
environment: | ||
- DB_PASS=${DB_PASSWORD} | ||
- DB_HOST=${DB_HOST} | ||
- DB_NAME=${DB_NAME} | ||
- DB_USER=${DB_USER} | ||
# volumes: | ||
# - vol_photo_updated:/inetpub/wwwroot/openIMIS/Images/Updated:rw | ||
# - vol_photo_submitted:/inetpub/wwwroot/openIMIS/Images/Submitted:rw | ||
networks: | ||
- openimis-net | ||
# volumes: | ||
# vol_photo_updated: | ||
# vol_photo_submitted: | ||
networks: | ||
openimis-net: |