Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Script recalcul calque
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ERASME
Script recalcul calque
Commits
5168b042
Commit
5168b042
authored
2 years ago
by
Pierre-Gilles Levallois
Browse files
Options
Downloads
Patches
Plain Diff
just another test more & more
parent
fa2b6e86
No related branches found
No related tags found
2 merge requests
!3
Launch script
,
!2
Refactoring : all scripts in Dockerfiles/python/scripts
Pipeline
#44272
passed
2 years ago
Stage: Build Calqul
Stage: Deploy Calqul
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Dockerfiles/db/Dockerfile
+15
-21
15 additions, 21 deletions
Dockerfiles/db/Dockerfile
deployment/db-calqul.yml
+3
-2
3 additions, 2 deletions
deployment/db-calqul.yml
with
18 additions
and
23 deletions
Dockerfiles/db/Dockerfile
+
15
−
21
View file @
5168b042
#
# ARB::Base de données postgis pour le calcul du calque de plantabilité
# ARB::Base de données postgis pour le calcul du calque de plantabilité
#
FROM postgis/postgis
FROM
postgis/postgis
#
# Create another dir for pgdata than /var/postgresql/data/
# Create another dir for pgdata than /var/postgresql/data/
#
# see http://heidloff.net/article/deploying-postgres-on-openshift/
# see http://heidloff.net/article/deploying-postgres-on-openshift/
#
USER root
USER
root
# ENV PGDATA=/var/lib/postgresql/data/pgdata
# ENV PGDATA=/var/lib/postgresql/data/pgdata
# # RUN mkdir arb-
data
ENV
PGDATA=/arb-data/pg
data
# RUN groupadd non-root-postgres-group && \
# RUN groupadd non-root-postgres-group && \
# useradd non-root-postgres-user --group non-root-postgres-group && \
# useradd non-root-postgres-user --group non-root-postgres-group && \
# mkdir -p $PGDATA && \
RUN
mkdir
-p
$PGDATA
&&
\
# chown -R non-root-postgres-user:non-root-postgres-group /$PGDATA && \
chown -R postgres:0 /$PGDATA && \
# chmod 777 /$PGDATA
chmod 777 /$PGDATA
# # Entry point.
# COPY ./db-init/ /docker-entrypoint-initdb.d/
# RUN ls -l /docker-entrypoint-initdb.d/
# Entry point.
COPY
./db-init/ /docker-entrypoint-initdb.d/
# USER non-root-postgres
# USER non-root-postgres
FROM
mdillon/postgis:10-alpine
# FROM mdillon/postgis:10-alpine
# USER root
USER
root
# RUN chown postgres:0 -R ${PGDATA}
# COPY ./db-init/ /docker-entrypoint-initdb.d/
RUN
chown
postgres:0
-R
${
PGDATA
}
COPY
./db-init/ /docker-entrypoint-initdb.d/
USER
postgres
USER
postgres
\ No newline at end of file
This diff is collapsed.
Click to expand it.
deployment/db-calqul.yml
+
3
−
2
View file @
5168b042
...
@@ -64,7 +64,8 @@ spec:
...
@@ -64,7 +64,8 @@ spec:
value
:
"
__POSTGRES_SCHEMA__"
value
:
"
__POSTGRES_SCHEMA__"
# need to define PGDATA env var because not using the default /var/lib/postgresql/data, but a subpath under it.
# need to define PGDATA env var because not using the default /var/lib/postgresql/data, but a subpath under it.
-
name
:
PGDATA
-
name
:
PGDATA
value
:
/var/lib/postgresql/data/pgdata
# value: /var/lib/postgresql/data/pgdata
value
:
/arb-data/pgdata
volumeMounts
:
volumeMounts
:
# need a subpath as postgres wants an empty folder (the mounted folder `/var/lib/postgresql/data` has a `lost+found` directory)
# need a subpath as postgres wants an empty folder (the mounted folder `/var/lib/postgresql/data` has a `lost+found` directory)
# see https://stackoverflow.com/questions/51168558/how-to-mount-a-postgresql-volume-using-aws-ebs-in-kubernete
# see https://stackoverflow.com/questions/51168558/how-to-mount-a-postgresql-volume-using-aws-ebs-in-kubernete
...
@@ -72,6 +73,6 @@ spec:
...
@@ -72,6 +73,6 @@ spec:
# the owner:group of this folder is 70:70 (postgres:postgres), done by this step in the docker image:
# the owner:group of this folder is 70:70 (postgres:postgres), done by this step in the docker image:
# https://github.com/docker-library/postgres/blob/master/Dockerfile-alpine.template#L146
# https://github.com/docker-library/postgres/blob/master/Dockerfile-alpine.template#L146
-
name
:
db-data
-
name
:
db-data
mountPath
:
"
/
v
ar
/lib/postgresql/
data/pgdata"
mountPath
:
"
/ar
b-
data/pgdata"
subpath
:
pgdata
subpath
:
pgdata
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