Skip to content

Commit d6b1628

Browse files
author
Miguel Leon
authored
Merge pull request #124 from lsetiawan/docker_dev
Fixed errors when building Docker Image & update README
2 parents 92da1bb + 78223fd commit d6b1628

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

docker/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM miniconda:latest
1+
FROM continuumio/miniconda:latest
22

33
ENV LANG=C.UTF-8 LC_ALL=C.UTF-8
44

@@ -22,7 +22,7 @@ VOLUME /db
2222
# Setting up postgresql database
2323
RUN apt-get update --fix-missing && apt-get install -y postgresql postgresql-client postgresql-contrib postgis
2424

25-
RUN git clone "https://github.com/lsetiawan/ODM2-Admin"
25+
RUN git clone "https://github.com/miguelcleon/ODM2-Admin"
2626

2727
RUN cd ODM2-Admin && latest=$(git describe --tags) && git checkout ${latest}
2828

@@ -33,7 +33,7 @@ RUN service postgresql start && su - postgres -c 'psql -U postgres -c "create da
3333
# su - postgres -c "psql -U postgres -d postgres -c \"alter user postgres with password 'test';\""
3434

3535
# creates an env with the depepencies
36-
RUN conda create --yes -n odm2adminenv -c conda-forge python=2.7 --file /ODM2-Admin/requirements.txt
36+
RUN conda create --yes -n odm2adminenv -c conda-forge python=2.7 pytz gdal --file /ODM2-Admin/requirements.txt
3737
RUN update-rc.d postgresql enable
3838

3939
COPY development.py /ODM2-Admin/templatesAndSettings/settings/

docker/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Requirements to run [docker image](https://hub.docker.com/r/lsetiawan/odm2admin/):
44

5-
1. ODM2 Database backup sql for PostgreSQL called odm2admindb.backup.
6-
2. Docker installed on Linux or MacOS, currently not working on windows.
5+
1. Docker installed on Linux, MacOS, or Windows.
6+
77
To run:
8-
$ docker run -d -p 8010:8010 -v path/to/local/db/backup/folder/:/db/ lsetiawan/odm2admin:latest
8+
$ docker run -d -p 8010:8010 --name odm2admintest lsetiawan/odm2admin:latest

docker/startup.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@
22

33
echo "Activating environment..."
44
source activate odm2adminenv
5+
conda install --yes -c conda-forge pytz
56

67
echo "Building database..."
7-
su - postgres -c 'pg_restore -d odm2_db -1 -v "/db/odm2admindb.backup"'
8+
su - postgres -c 'pg_restore -d odm2_db -1 -v "/ODM2-Admin/ODM2AdminExamplePostgresqlDB"'
89
su - postgres -c "psql -U postgres -d postgres -c \"alter user postgres with password 'test';\""
910

1011
echo "Running server..."

0 commit comments

Comments
 (0)