Author: Anaël Ollier nanawel+reciphpes@gmail.com
Notice: Currently the application cannot be accessed from a URL using a custom base path:
☑️ WILL WORK: http://reciphpes.myhost.org/
❌ WILL NOT WORK: http://something.myhost.org/reciphpes
See prebuilt image available on Docker Hub: https://hub.docker.com/r/nanawel/reciphpes
docker pull nanawel/reciphpes
Create a dedicated folder (here /opt/reciphpes
) to hold docker-compose.yml
and the data directory and give the latter required permissions for www-data
in the container.
mkdir -p /opt/reciphpes/data/db /opt/reciphpes/data/log
chgrp -R 33 /opt/reciphpes/data/*
chmod -R g+w /opt/reciphpes/data/*
Example of docker-compose.yml
(here listening on port 8000
):
version: '3.2'
services:
app:
image: nanawel/reciphpes
container_name: reciphpes
restart: always
ports:
- '8000:80'
volumes:
- './data/db:/var/www/webapp/var/db:rw'
- './data/log:/var/www/webapp/var/log:rw'
#environment:
#APP_DEFAULT_LOCALE: en # default is "fr" for historical reasons
#APP_SET_LOCALE_FROM_ACCEPT_LANGUAGE: false # default is true
#APP_SET_CONTENT_LANGUAGE_FROM_LOCALE: false # default is true
Start the container with
cd /opt/reciphpes
docker-compose up -d
Then init the database (first time only):
docker-compose exec -u www-data app make install
(Optional) You might want to generate a new secret value:
docker-compose exec app make new-secret
You may now access the application at http://localhost:8000/.
See next section when upgrading.
docker-compose pull
gzip -c data/db/app.db > data/db/app.$(date +%F_%H-%M-%S).sqlite.gz
docker-compose up -d
docker-compose exec -u www-data app bin/console doctrine:migrations:migrate -n
docker-compose exec app make new-secret # (optional)
git clone https://github.com/nanawel/reciphpes.git /opt/reciphpes-src
cd /opt/reciphpes-src
make build
Copy .env
to .env.local
and adjust values to your environment.
You might particularly want to change WEBAPP_UID
to your own UID
(to prevent permission issues with your files and the ones created
by Apache in the container).
make dev-build
make dev-startd HTTP_PORT=8080 # Choose any free port
You may now enter the container with make shell
and issue the
commands provided in the section below.
Requirements
- Apache 2 with PHP 7.1+
- Composer
- NodeJS 14+
- yarn
make install
# Start assets builder watch task
yarn run encore dev --watch
See LICENSE.