-
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.
[Update] PostgreSQL to version 12.3 (#6)
* [Update] init script to make cdp4 user a SUPERUSER; fixes #1 * [Add] Corporate Contributor License Agreement version 2.1 * [Add] Individual Contributor License Agreement version 2.1 * [Add] Release script added * [Update] PostgreSQL to version 12.3 Co-authored-by: samatrhea <[email protected]>
- Loading branch information
Alex Vorobiev
and
samatrhea
authored
Jun 9, 2020
1 parent
d5980dd
commit 1899c01
Showing
7 changed files
with
106 additions
and
12 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
FROM postgres:9.6.14 | ||
FROM postgres:12.3 | ||
MAINTAINER [email protected] | ||
|
||
COPY LICENSE / | ||
|
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 |
---|---|---|
@@ -1,10 +1,6 @@ | ||
#!/bin/bash | ||
psql -U postgres -p 5432 --command="CREATE USER cdp4 WITH PASSWORD 'cdp4';" | ||
psql -U postgres -p 5432 --command="ALTER USER cdp4 WITH SUPERUSER;" | ||
psql -U postgres -p 5432 --command="GRANT pg_signal_backend TO cdp4;" | ||
psql -U postgres -p 5432 --command="CREATE DATABASE cdp4manage WITH OWNER = cdp4 ENCODING 'UTF-8';" | ||
psql -U postgres -p 5432 -d cdp4manage --command="CREATE EXTENSION IF NOT EXISTS hstore;" | ||
psql -U postgres -p 5432 -d cdp4manage --command="CREATE EXTENSION IF NOT EXISTS \"uuid-ossp\";" | ||
psql -U postgres -p 5432 --command="GRANT CONNECT ON DATABASE cdp4manage TO cdp4;" | ||
psql -U postgres -p 5432 --command="GRANT ALL ON DATABASE cdp4manage TO cdp4;" | ||
psql -U postgres -p 5432 --command="ALTER USER cdp4 CREATEDB;" | ||
psql -U postgres -p 5432 --command="ALTER ROLE cdp4 SET statement_timeout = 30000;" | ||
psql -U postgres -p 5432 -d cdp4manage --command="CREATE EXTENSION IF NOT EXISTS \"uuid-ossp\";" |
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
FROM postgres:9.6.14 | ||
FROM postgres:12.3 | ||
MAINTAINER [email protected] | ||
|
||
COPY LICENSE / | ||
|
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,82 @@ | ||
@echo off | ||
|
||
IF %1.==. GOTO VersionError | ||
set version=%1 | ||
|
||
GOTO Setup | ||
|
||
:VersionError | ||
ECHO. | ||
ECHO ERROR: No version was specified | ||
ECHO. | ||
|
||
GOTO End | ||
|
||
:Setup | ||
|
||
ECHO Releasing Version %version% | ||
|
||
set dry=false | ||
|
||
IF %2.==. GOTO Begin | ||
IF %2==dry GOTO Dry | ||
|
||
:Dry | ||
|
||
ECHO. | ||
ECHO Performing dry run... | ||
ECHO. | ||
|
||
set dry=true | ||
|
||
:Begin | ||
|
||
ECHO. | ||
ECHO Cleaning up... | ||
ECHO. | ||
|
||
REM cleanup previous if exists | ||
docker rmi cdp4-test-database-community-edition:%version% | ||
docker rmi rheagroup/cdp4-test-database-community-edition:%version% | ||
|
||
docker rmi cdp4-database-community-edition:%version% | ||
docker rmi rheagroup/cdp4-database-community-edition:%version% | ||
|
||
REM remove local latest if exists | ||
docker rmi cdp4-test-database-community-edition:latest | ||
docker rmi rheagroup/cdp4-test-database-community-edition:latest | ||
|
||
docker rmi cdp4-database-community-edition:latest | ||
docker rmi rheagroup/cdp4-database-community-edition:latest | ||
|
||
ECHO. | ||
ECHO Building images... | ||
ECHO. | ||
|
||
REM build and tag | ||
docker build -f cdp4-database-bare-community-edition\Dockerfile -t cdp4-test-database-community-edition:%version% -t cdp4-test-database-community-edition:latest .\cdp4-database-bare-community-edition | ||
docker tag cdp4-test-database-community-edition:%version% rheagroup/cdp4-test-database-community-edition:%version% | ||
docker tag cdp4-test-database-community-edition:latest rheagroup/cdp4-test-database-community-edition:latest | ||
|
||
docker build -f cdp4-database-community-edition\Dockerfile -t cdp4-database-community-edition:%version% -t cdp4-database-community-edition:latest .\cdp4-database-community-edition | ||
docker tag cdp4-database-community-edition:%version% rheagroup/cdp4-database-community-edition:%version% | ||
docker tag cdp4-database-community-edition:latest rheagroup/cdp4-database-community-edition:latest | ||
|
||
IF %dry% equ true GOTO End | ||
|
||
ECHO. | ||
ECHO Pushing... | ||
ECHO. | ||
|
||
REM push | ||
docker push rheagroup/cdp4-test-database-community-edition:%version% | ||
docker push rheagroup/cdp4-test-database-community-edition:latest | ||
|
||
docker push rheagroup/cdp4-database-community-edition:%version% | ||
docker push rheagroup/cdp4-database-community-edition:latest | ||
|
||
:End | ||
|
||
ECHO. | ||
ECHO Release %version% Completed | ||
ECHO. |