Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Pico CMS
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
Service Desk
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
NoCloud
docker
Pico CMS
Commits
15aee979
Verified
Commit
15aee979
authored
3 years ago
by
David Beniamine
Browse files
Options
Downloads
Patches
Plain Diff
Auto empty cache upon FS change and stack restart
parent
b46f0545
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
config/config.yml
+0
-1
0 additions, 1 deletion
config/config.yml
docker/Dockerfile
+7
-1
7 additions, 1 deletion
docker/Dockerfile
docker/entrypoint.sh
+22
-0
22 additions, 0 deletions
docker/entrypoint.sh
with
29 additions
and
2 deletions
config/config.yml
+
0
−
1
View file @
15aee979
...
@@ -67,4 +67,3 @@ PicoZCache:
...
@@ -67,4 +67,3 @@ PicoZCache:
dir
:
content/cache/html/
# Directory where cache should be saved
dir
:
content/cache/html/
# Directory where cache should be saved
time
:
2592000
# Interval between caching (period from one to second cache) in seconds, here is 7 days = 60 * 60 * 24 * 30.
time
:
2592000
# Interval between caching (period from one to second cache) in seconds, here is 7 days = 60 * 60 * 24 * 30.
xhtml_output
:
false
# If true, XHTML Content-Type header will be sent when loading cache page
xhtml_output
:
false
# If true, XHTML Content-Type header will be sent when loading cache page
ignore_url_regex
:
"
/blog/"
This diff is collapsed.
Click to expand it.
docker/Dockerfile
+
7
−
1
View file @
15aee979
...
@@ -5,7 +5,7 @@ RUN composer create-project --no-interaction picocms/pico-composer pico
...
@@ -5,7 +5,7 @@ RUN composer create-project --no-interaction picocms/pico-composer pico
FROM
php:7.4-apache
FROM
php:7.4-apache
RUN
apt-get update
&&
\
RUN
apt-get update
&&
\
apt-get
install
-y
libonig-dev libxml2-dev locales
&&
\
apt-get
install
-y
inotify-tools
libonig-dev libxml2-dev locales
&&
\
docker-php-ext-install
-j
$(
nproc
)
dom mbstring
&&
\
docker-php-ext-install
-j
$(
nproc
)
dom mbstring
&&
\
docker-php-ext-enable dom mbstring
docker-php-ext-enable dom mbstring
...
@@ -19,3 +19,9 @@ COPY --from=builder /app/pico /var/www/html
...
@@ -19,3 +19,9 @@ COPY --from=builder /app/pico /var/www/html
RUN
a2enmod rewrite
RUN
a2enmod rewrite
COPY
pico.conf /etc/apache2/sites-enabled/000-default.conf
COPY
pico.conf /etc/apache2/sites-enabled/000-default.conf
COPY
entrypoint.sh /entrypoint.sh
RUN
chmod
+x /entrypoint.sh
ENTRYPOINT
/entrypoint.sh
This diff is collapsed.
Click to expand it.
docker/entrypoint.sh
0 → 100644
+
22
−
0
View file @
15aee979
#!/bin/bash
basedir
=
/var/www/html
cachedir
=
$basedir
/content/cache
clear_cache
()
{
echo
"Clearing HTML cache"
rm
-rf
$cachedir
/html/
*
echo
"Clearing TWIG cache"
rm
-rf
$cachedir
/twig/
*
}
watcher
()
{
clear_cache
inotifywait
-m
-r
-e
modify
-e
move
-e
create
-e
delete
\
--exclude
'\.*.sw?'
\
--exclude
$cachedir
\
$basedir
|
\
while
read dir
ev file
;
do
echo
"File
$ev
detected"
clear_cache
done
}
watcher &
exec
apache2ctl
-DFOREGROUND
This diff is collapsed.
Click to expand it.
David Beniamine
@dbeniamine
mentioned in issue
#1 (closed)
·
3 years ago
mentioned in issue
#1 (closed)
mentioned in issue #1
Toggle commit list
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