Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Castopod
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Guy Martin (Dwev)
Castopod
Commits
18f6b75d
Unverified
Commit
18f6b75d
authored
2 years ago
by
Romain de Laage
Browse files
Options
Downloads
Patches
Plain Diff
build(docker): use supervisord in unit image
parent
ae5e12be
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
docker/production/unit/Dockerfile
+2
-1
2 additions, 1 deletion
docker/production/unit/Dockerfile
docker/production/unit/entrypoint.sh
+5
-4
5 additions, 4 deletions
docker/production/unit/entrypoint.sh
docker/production/unit/supervisord.conf
+19
-0
19 additions, 0 deletions
docker/production/unit/supervisord.conf
with
26 additions
and
5 deletions
docker/production/unit/Dockerfile
+
2
−
1
View file @
18f6b75d
...
@@ -37,9 +37,10 @@ COPY docker/production/unit/entrypoint.sh /entrypoint.sh
...
@@ -37,9 +37,10 @@ COPY docker/production/unit/entrypoint.sh /entrypoint.sh
COPY
castopod /var/www/castopod
COPY
castopod /var/www/castopod
COPY
docker/production/unit/config.json /config.json
COPY
docker/production/unit/config.json /config.json
COPY
docker/production/unit/crontab.txt /crontab.txt
COPY
docker/production/unit/crontab.txt /crontab.txt
COPY
docker/production/unit/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
RUN
apt-get update
&&
\
RUN
apt-get update
&&
\
apt-get
install
-y
ffmpeg curl libfreetype6-dev libjpeg62-turbo-dev libpng-dev libwebp-dev libxpm-dev libpcre2-8-0 libicu-dev
&&
\
apt-get
install
-y
supervisor
ffmpeg curl libfreetype6-dev libjpeg62-turbo-dev libpng-dev libwebp-dev libxpm-dev libpcre2-8-0 libicu-dev
&&
\
rm
-rf
/var/lib/apt/lists/
*
&&
\
rm
-rf
/var/lib/apt/lists/
*
&&
\
pecl
install
-o
-f
redis
&&
\
pecl
install
-o
-f
redis
&&
\
rm
-rf
/tmp/pear
&&
\
rm
-rf
/tmp/pear
&&
\
...
...
This diff is collapsed.
Click to expand it.
docker/production/unit/entrypoint.sh
+
5
−
4
View file @
18f6b75d
...
@@ -191,7 +191,8 @@ EOF
...
@@ -191,7 +191,8 @@ EOF
fi
fi
fi
fi
unitd
--no-daemon
&
#Run database migrations after 10 seconds (to wait for the database to be started)
php spark castopod:database-update
(
sleep
10
&&
php spark castopod:database-update
)
&
sleep
2
&&
curl
-X
PUT
--data-binary
@/config.json
--unix-socket
/var/run/control.unit.sock http://localhost/config/
#Apply configuration after unit is started
supercronic /crontab.txt
(
sleep
2
&&
curl
-X
PUT
--data-binary
@/config.json
--unix-socket
/var/run/control.unit.sock http://localhost/config/
)
&
supervisord
This diff is collapsed.
Click to expand it.
docker/production/unit/supervisord.conf
0 → 100644
+
19
−
0
View file @
18f6b75d
[
supervisord
]
nodaemon
=
true
[
program
:
supercronic
]
command
=
supercronic
/
crontab
.
txt
autostart
=
true
autorestart
=
unexpected
stdout_logfile
=/
dev
/
stdout
stdout_logfile_maxbytes
=
0
stderr_logfile
=/
dev
/
stderr
stderr_logfile_maxbytes
=
0
[
program
:
unit
]
command
=
unitd
--
no
-
daemon
autostart
=
true
autorestart
=
unexpected
stdout_logfile
=/
dev
/
stdout
stdout_logfile_maxbytes
=
0
stderr_logfile_maxbytes
=
0
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