Skip to content

Commit 4eb3569

Browse files
committed
Add crons for spryker.
1 parent 5e75592 commit 4eb3569

12 files changed

Lines changed: 93 additions & 2 deletions

spryker/Dockerfile.tmpl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,5 @@ RUN curl -sL https://deb.nodesource.com/setup_6.x > /tmp/install-node.sh \
1818
&& rm -rf /var/lib/apt/lists/*
1919
2020
COPY ./{{WEB_SERVER}}/ /
21+
COPY ./etc/ /etc/
2122
COPY ./usr/ /usr/
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[template]
2+
src = "cron/spryker.tmpl"
3+
dest = "/etc/cron.d/spryker"
4+
mode = "0644"
5+
keys = [
6+
]
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[template]
2+
src = "supervisor/spryker_collectors_crons.conf.tmpl"
3+
dest = "/etc/supervisor/conf.d/spryker_collectors_crons.conf"
4+
mode = "0644"
5+
keys = [
6+
]
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[template]
2+
src = "supervisor/spryker_crons.conf.tmpl"
3+
dest = "/etc/supervisor/conf.d/spryker_crons.conf"
4+
mode = "0644"
5+
keys = [
6+
]
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# don't send any mail
2+
MAILTO=""
3+
SUPERVISORCTL="supervisorctl -c /etc/supervisor/supervisord.conf -u supervisor -p supervisor"
4+
5+
*/10 * * * * root $SUPERVISORCTL start mailqueue-registration-send
6+
* * * * * root $SUPERVISORCTL start stores-collectors
7+
* * * * * root $SUPERVISORCTL start oms-check-condition
8+
* * * * * root $SUPERVISORCTL start oms-check-timeout
9+
0 6 * * * root $SUPERVISORCTL start oms-clear-locks
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
[program: stores-collectors]
2+
command = /usr/local/bin/container run_collectors
3+
startsecs = 0
4+
startretries = 0
5+
stdout_logfile=/dev/stdout
6+
stdout_logfile_maxbytes=0
7+
stderr_logfile=/dev/stderr
8+
stderr_logfile_maxbytes=0
9+
user = root
10+
autostart = false
11+
autorestart = false
12+
priority = 5
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{{ $nodes := split "mailqueue:registration:send,oms:check-condition,oms:check-timeout,oms:clear-locks" "," }}
2+
{{ range $nodes }}
3+
[program: {{ replace ( . ) ":" "-" -1 }}]
4+
command = /app/vendor/bin/console {{ . }}
5+
startsecs = 0
6+
startretries = 0
7+
stdout_logfile=/dev/stdout
8+
stdout_logfile_maxbytes=0
9+
stderr_logfile=/dev/stderr
10+
stderr_logfile_maxbytes=0
11+
user = www-data
12+
autostart = false
13+
autorestart = false
14+
priority = 5
15+
{{ end }}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[template]
2+
src = "nginx/site_internal_requests.conf.tmpl"
3+
dest = "/etc/nginx/sites-available/default-05-site_internal_requests.conf"
4+
mode = "0644"
5+
keys = [
6+
]
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
if ($http_x_internal_request ~ 1) {
2+
set $do_https_redirect 0;
3+
}

spryker/usr/local/share/container/baseimage-45.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ do_templating() {
2222

2323
alias_function do_start do_spryker_start_inner
2424
do_start() {
25+
do_spryker_hosts
2526
do_spryker_config_create
2627
do_spryker_start_inner
2728
}

0 commit comments

Comments
 (0)