-
Notifications
You must be signed in to change notification settings - Fork 1
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 #2 from WASAC/add-docker
added docker
- Loading branch information
Showing
7 changed files
with
64 additions
and
2 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 |
---|---|---|
|
@@ -2,4 +2,5 @@ | |
/venv | ||
/__pycache__ | ||
/epanet/__pycache__ | ||
/util/__pycache__ | ||
/util/__pycache__ | ||
/data |
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,8 @@ | ||
FROM python:3.7 | ||
RUN mkdir -p /tmp/src | ||
COPY . /tmp/src | ||
WORKDIR /tmp/src | ||
RUN pip install -r ./requirements.txt | ||
|
||
RUN chmod a+x /tmp/src/entrypoint.sh | ||
ENTRYPOINT ["./entrypoint.sh"] |
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,15 @@ | ||
version: '2' | ||
services: | ||
python: | ||
image: wasac/postgis2epanet:v2.0.0 | ||
# build: . | ||
environment: | ||
- db_user=postgres | ||
- db_password=wasacgis | ||
- db_host=host.docker.internal | ||
- db_port=5432 | ||
- database=rwss_assets | ||
# If you want to specify districts to be exported, please put here like "51,52,53" | ||
- districts= | ||
volumes: | ||
- ./data:/tmp/src/data |
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,10 @@ | ||
#!/bin/bash | ||
|
||
cd /tmp/src | ||
|
||
target="${districts}" | ||
if [ -n "$target" ]; then | ||
python postgis2epanet.py -d $database -H $db_host -p $db_port -u $db_user -w $db_password -l $target | ||
else | ||
python postgis2epanet.py -d $database -H $db_host -p $db_port -u $db_user -w $db_password | ||
fi |
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