Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker: switch to the C2C official postgres image #2275

Merged
merged 1 commit into from
Jun 2, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion c2cgeoportal/scaffolds/create/+dot+gitignore_tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@
/mapserver/demo.map
/mapserver/tinyows.xml
/mapserver/replace_db.sh
/testDB/01-schemas.sql
/testDB/11-schemas.sql
/testDB/12-alembic.sql
/testDB/13-alembic-static.sql
/testDB/Dockerfile
/deploy/hooks/pre-restore-database
/{{package}}/version.py
Expand Down
2 changes: 2 additions & 0 deletions c2cgeoportal/scaffolds/create/docker-compose.yml.mako
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
db:
build: testDB
environment:
POSTGRES_USER: ${dbuser}
POSTGRES_DB: ${db}
POSTGRES_PASSWORD: ${dbpassword}
#ports:
# - 15432:5432
Expand Down
6 changes: 3 additions & 3 deletions c2cgeoportal/scaffolds/update/CONST_Makefile_tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -1207,13 +1207,13 @@ push_docker:
docker push $(DOCKER_BASE)_mapserver:$(DOCKER_TAG)

.PHONY: testDB
testDB: testDB/02-alembic.sql testDB/03-alembic-static.sql
testDB: testDB/12-alembic.sql testDB/13-alembic-static.sql

testDB/02-alembic.sql: $(VENV_BIN)/alembic$(PYTHON_BIN_POSTFIX) alembic.ini
testDB/12-alembic.sql: $(VENV_BIN)/alembic$(PYTHON_BIN_POSTFIX) alembic.ini
$(PRERULE_CMD)
$(VENV_BIN)/alembic -c alembic.ini upgrade --sql head > $@

testDB/03-alembic-static.sql: $(VENV_BIN)/alembic$(PYTHON_BIN_POSTFIX) alembic_static.ini
testDB/13-alembic-static.sql: $(VENV_BIN)/alembic$(PYTHON_BIN_POSTFIX) alembic_static.ini
$(PRERULE_CMD)
$(VENV_BIN)/alembic -c alembic_static.ini upgrade --sql head > $@
endif
Expand Down
2 changes: 0 additions & 2 deletions c2cgeoportal/scaffolds/update/testDB/01-schemas.sql.mako

This file was deleted.

2 changes: 2 additions & 0 deletions c2cgeoportal/scaffolds/update/testDB/11-schemas.sql.mako
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
CREATE SCHEMA IF NOT EXISTS ${schema};
CREATE SCHEMA IF NOT EXISTS ${schema}_static;
4 changes: 1 addition & 3 deletions c2cgeoportal/scaffolds/update/testDB/Dockerfile.mako
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
FROM camptocamp/postgis:9.5
FROM camptocamp/postgresql:pg9.5-latest
MAINTAINER Camptocamp "[email protected]"

ENV POSTGRES_USER ${dbuser}
ENV POSTGRES_DB ${db}
ADD *.sql *.csv *.sh /docker-entrypoint-initdb.d/
2 changes: 1 addition & 1 deletion doc/integrator/docker.rst
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Database container

You can add scripts to populate the DB container by adding ``.sql`` or ``.sh``
files in the ``testDB`` directory. They must start with 2 digits, followed by
an underscore. Please start at number 10.
an underscore. Please start at number 20.

Developer composition
---------------------
Expand Down