Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
Dockerfiles
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Picasoft
Technique
Dockerfiles
Commits
8a91c1c9
Verified
Commit
8a91c1c9
authored
4 years ago
by
Gaëtan Blond
Browse files
Options
Downloads
Patches
Plain Diff
[Mobilizon] Fixed db not working
parent
e79a07b3
No related branches found
Branches containing commit
No related tags found
1 merge request
!55
Mobilizon
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
pica-mobilizon/db/Dockerfile
+5
-6
5 additions, 6 deletions
pica-mobilizon/db/Dockerfile
pica-mobilizon/db/initdb-postgis.sh
+21
-0
21 additions, 0 deletions
pica-mobilizon/db/initdb-postgis.sh
pica-mobilizon/docker-compose.yml
+1
-1
1 addition, 1 deletion
pica-mobilizon/docker-compose.yml
with
27 additions
and
7 deletions
pica-mobilizon/db/Dockerfile
+
5
−
6
View file @
8a91c1c9
FROM
postgres:12-alpine
ARG
POSTGRES_DB
RUN
apk update
\
&&
apk add
--update
postgis
\
&&
rm
-rf
/tmp/
*
/var/tmp/
*
RUN
printf
"
\\
c "
$POSTGRES_DB
"
\n
CREATE EXTENSION postgis;
\n
CREATE EXTENSION pg_trgm;
\n
CREATE EXTENSION unaccent;"
>
/docker-entrypoint-initdb.d/setup.sql
# Same Dockerfile as official image, but different extensions :
# https://github.com/postgis/docker-postgis/blob/7639baab95220201b87476b2dd09e011423ebd55/12-3.0/alpine/initdb-postgis.sh
FROM
postgis/postgis:12-3.0-alpine
COPY
./initdb-postgis.sh /docker-entrypoint-initdb.d/10_postgis.sh
This diff is collapsed.
Click to expand it.
pica-mobilizon/db/initdb-postgis.sh
0 → 100644
+
21
−
0
View file @
8a91c1c9
#!/bin/sh
set
-e
# Perform all actions as $POSTGRES_USER
export
PGUSER
=
"
$POSTGRES_USER
"
# Create the 'template_postgis' template db
"
${
psql
[@]
}
"
<<-
'
EOSQL
'
CREATE DATABASE template_postgis IS_TEMPLATE true;
EOSQL
# Load PostGIS into both template_database and $POSTGRES_DB
for
DB
in
template_postgis
"
$POSTGRES_DB
"
;
do
echo
"Loading PostGIS extensions into
$DB
"
"
${
psql
[@]
}
"
--dbname
=
"
$DB
"
<<-
'
EOSQL
'
CREATE EXTENSION IF NOT EXISTS postgis;
CREATE EXTENSION IF NOT EXISTS pg_trgm;
CREATE EXTENSION IF NOT EXISTS unaccent;
EOSQL
done
This diff is collapsed.
Click to expand it.
pica-mobilizon/docker-compose.yml
+
1
−
1
View file @
8a91c1c9
...
...
@@ -60,7 +60,7 @@ services:
context
:
./db
dockerfile
:
Dockerfile
args
:
-
POSGRES_DB=postgres_mobilizon
-
POS
T
GRES_DB=postgres_mobilizon
container_name
:
mobilizon-db
volumes
:
-
mobilizon-db:/var/lib/postgresql/data
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment