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
153a6bfd
Verified
Commit
153a6bfd
authored
4 years ago
by
Quentin Duchemin
Browse files
Options
Downloads
Patches
Plain Diff
[docker_test.sh] Use testing URLs only after build, to avoid them in final image
parent
ff805498
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
docker_test.sh
+8
-8
8 additions, 8 deletions
docker_test.sh
pica-lufi/Dockerfile
+1
-1
1 addition, 1 deletion
pica-lufi/Dockerfile
pica-lufi/entrypoint.sh
+5
-0
5 additions, 0 deletions
pica-lufi/entrypoint.sh
pica-lufi/lufi.conf
+2
-2
2 additions, 2 deletions
pica-lufi/lufi.conf
with
16 additions
and
11 deletions
docker_test.sh
+
8
−
8
View file @
153a6bfd
...
...
@@ -75,14 +75,6 @@ cd "$1"
create_dumb_secrets
# Except for registry URL, useful to push to production registry after build
echo
-e
"
\n
==== Replace production URL with testing URL in all files ===="
for
f
in
$(
grep
-l
-r
".picasoft.net"
.
)
;
do
echo
-e
"
\t
Found in"
${
f
}
sed
-i
"s/.picasoft.net/.test.picasoft.net/g"
${
f
}
sed
-i
"s/registry.test.picasoft.net/registry.picasoft.net/g"
${
f
}
done
echo
-e
"
\n
==== Remove and re-create named external volumes ===="
for
v
in
$(
docker-compose config
--volumes
)
;
do
res
=
$(
grep
$v
-A
1 docker-compose.yml |
grep
'external'
||
true
)
...
...
@@ -103,6 +95,14 @@ docker-compose build
echo
-e
"
\n
==== Pull new versions of external images ===="
docker-compose pull
# Except for registry URL, useful to push to production registry after build
echo
-e
"
\n
==== Replace production URL with testing URL in all files ===="
for
f
in
$(
grep
-l
-r
".picasoft.net"
.
)
;
do
echo
-e
"
\t
Found in"
${
f
}
sed
-i
"s/.picasoft.net/.test.picasoft.net/g"
${
f
}
sed
-i
"s/registry.test.picasoft.net/registry.picasoft.net/g"
${
f
}
done
echo
-e
"
\n
==== Lauch
$1
===="
docker-compose up
-d
...
...
This diff is collapsed.
Click to expand it.
pica-lufi/Dockerfile
+
1
−
1
View file @
153a6bfd
...
...
@@ -5,7 +5,7 @@ ENV APP_HOME=/lufi
# Install dependencies
RUN
apt-get update
\
&&
apt-get
-yq
install
build-essential libssl-dev libio-socket-ssl-perl liblwp-protocol-https-perl libpq-dev zlib1g-dev wget unzip
\
&&
apt-get
-yq
install
build-essential libssl-dev libio-socket-ssl-perl liblwp-protocol-https-perl libpq-dev zlib1g-dev
postgresql-client
wget unzip
\
&&
apt-get clean
&&
cpan Carton
# Install Supercronic to run cron jobs
...
...
This diff is collapsed.
Click to expand it.
pica-lufi/entrypoint.sh
+
5
−
0
View file @
153a6bfd
...
...
@@ -28,6 +28,11 @@ echo "0 0 * * * carton exec $APP_HOME/script/lufi cron cleanbdd --mode productio
# Delete files which availability delay is over
echo
"0 0 * * * carton exec
$APP_HOME
/script/lufi cron cleanfiles --mode production"
>
/crontab.conf
# Wait database to be ready
while
!
PGPASSWORD
=
"
${
POSTGRES_PASSWORD
}
"
psql
-h
"lufidb"
-U
"
${
POSTGRES_USER
}
"
-d
"
${
POSTGRES_DB
}
"
-c
"SELECT 1"
&>/dev/null
;
do
echo
"Database server not ready yet, re-trying in 5 seconds..."
sleep
5
done
echo
"Start Lufi..."
$@
&
...
...
This diff is collapsed.
Click to expand it.
pica-lufi/lufi.conf
+
2
−
2
View file @
153a6bfd
...
...
@@ -139,12 +139,12 @@
mail
=> {
# Valid values are 'sendmail' and 'smtp'
how
=>
'smtp'
,
h
owargs
=>
[
'mail.picasoft.net
:587'
,
AuthUser
=>
'drop@picasoft.net'
,
AuthPass
=> $
ENV
{
'EMAIL_PASSWORD'
}]
owargs
=>
{
host
=>
'mail.picasoft.net
'
,
ssl
=>
'starttls'
,
sasl_username
=>
'drop'
,
sasl_password
=> $
ENV
{
'EMAIL_PASSWORD'
},
helo
=>
'drop.test.picasoft.net'
}
},
# Email sender address
# optional, default to no-reply@lufi.io
mail_sender
=>
'picasoft
@assos.utc.fr'
,
mail_sender
=>
'
drop@
picasoft
.net'
#############
# DB settings
...
...
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