Compare commits

...

2 commits

4 changed files with 15 additions and 10 deletions

View file

@ -154,7 +154,14 @@ WORKDIR /var/www/dotclear/app
# Add container starting script
ADD docker-entrypoint.sh /entrypoint.sh
USER www
ENTRYPOINT ["/bin/sh", "/entrypoint.sh"]
USER root
# FPM must start first in daemon mode
# Then nginx in no daemon mode
SHELL ["/bin/sh", "-c"]
CMD php-fpm84 -D && nginx
# Docker container healthcheck
HEALTHCHECK --timeout=10s CMD curl --silent --fail http://127.0.0.1:80/fpm-ping || exit 1

View file

@ -95,8 +95,4 @@ echo >&2 "│ ◦ PHP $(php84 -r "echo PHP_VERSION;")"
echo >&2 "│ ◦ Dotclear ${VERSION_INSTALLED}"
echo >&2 '└──'
# Start web server
php-fpm84 -D # FPM must start first in daemon mode
nginx # Then nginx in no daemon mode
exec "$@"

View file

@ -6,7 +6,7 @@ services:
restart: unless-stopped
command: --transaction-isolation=READ-COMMITTED --log-bin=binlog --binlog-format=ROW
volumes:
- dcstable/db:/var/lib/mysql
- dcstable_db:/var/lib/mysql
environment:
MYSQL_ROOT_PASSWORD: dotclear_root
MYSQL_DATABASE: dotclear_db
@ -24,7 +24,7 @@ services:
container_name: dcstableapp
restart: unless-stopped
volumes:
- dcstable/app:/var/www/dotclear
- dcstable_app:/var/www/dotclear
ports:
- 80:80
depends_on:
@ -40,4 +40,5 @@ services:
DC_ADMINMAILFROM: contact@exemple.com
volumes:
dcstable:
dcstable_db:
dcstable_app:

View file

@ -10,7 +10,7 @@ services:
POSTGRES_DB: dcstable_db
PGDATA: /var/lib/postgresql/data/pgdata
volumes:
- dcstable:/var/lib/postgresql/data
- dcstable_db:/var/lib/postgresql/data
healthcheck:
test: [ "CMD-SHELL", "pg_isready -d $${POSTGRES_DB} -U $${POSTGRES_USER}" ]
interval: 1s
@ -24,7 +24,7 @@ services:
ports:
- 80:80
volumes:
- dcstable/app:/var/www/dotclear
- dcstable_app:/var/www/dotclear
depends_on:
dcstabledb:
condition: service_healthy
@ -38,4 +38,5 @@ services:
DC_ADMINMAILFROM: contact@exemple.com
volumes:
dcstable:
dcstable_db:
dcstable_app: