Commit 25626f46 authored by Quentin Duchemin's avatar Quentin Duchemin
Browse files

[PicaPlume] Remove stupid singlequote around variable names in entrypoint

parent d7fd0be7
......@@ -28,6 +28,14 @@ Lancer :
docker-compose up -d
```
### Administration de l'instance
```bash
docker exec -it plume
```
Puis utilisation de l'[outil plm](https://docs.joinplu.me/CLI/).
### Évolution de l'image
Toutes les variables d'environnement ajoutées dans le [docker-compose.yml](./docker-compose.yml) à destination de Plume doivent être écrite dans le fichier `/app/.env` : cette tâche est réalisée dans le ficheir [entrypoint.sh](./entrypoint.sh).
......
......@@ -29,6 +29,10 @@ while ! psql -h"${DB_HOST}" -U"${POSTGRES_USER}" -d"${POSTGRES_DB}" -c "SELECT 1
sleep 5
done
# Create the .env file used by Plume
echo "Create environment file for Plume..."
echo "DATABASE_URL=postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${DB_HOST}:5432/${POSTGRES_DB}" >> /app/.env
# If first launch, initialize and create marker file
if [ ! -f ${FIRSTLAUNCH_PATH} ]; then
echo "First launch detected."
......@@ -37,9 +41,9 @@ if [ ! -f ${FIRSTLAUNCH_PATH} ]; then
echo "Initialize search index..."
plm search init
echo "Initialize instance..."
plm instance new -d '$URL' -n '$NAME' -l 'CC-BY-SA'
plm instance new -d "$URL" -n "$NAME" -l "CC-BY-SA"
echo "Create admin user..."
plm users new -n '$ADMIN_USER' -N '$ADMIN_NAME' -b '' -e '$ADMIN_EMAIL' -p '$ADMIN_PASS' --admin
plm users new -n "$ADMIN_USER" -N "$ADMIN_NAME" -b "" -e "$ADMIN_EMAIL" -p "$ADMIN_PASS" --admin
echo "Done."
touch ${FIRSTLAUNCH_PATH}
fi
......@@ -54,22 +58,5 @@ fi
# Now write the current version into the file
echo "${PLUME_VERSION}" > ${FIRSTLAUNCH_PATH}
# Create the .env file used by Plume
echo "Create environment file for Plume..."
echo "BASE_URL=${BASE_URL}" > /app/.env
echo "MIGRATION_DIRECTORY=${MIGRATION_DIRECTORY}" >> /app/.env
echo "ROCKET_SECRET_KEY=${ROCKET_SECRET_KEY}" >> /app/.env
echo "ROCKET_PORT=${ROCKET_PORT}" >> /app/.env
echo "ROCKET_ADDRESS=${ROCKET_ADDRESS}" >> /app/.env
echo "ADMIN_USER=${ADMIN_USER}" >> /app/.env
echo "NAME=${NAME}" >> /app/.env
echo "ADMIN_EMAIL=${ADMIN_EMAIL}" >> /app/.env
echo "ADMIN_NAME=${ADMIN_NAME}" >> /app/.env
echo "MAIL_SERVER=${MAIL_SERVER}" >> /app/.env
echo "MAIL_USER=${MAIL_USER}" >> /app/.env
echo "MAIL_PASSWORD=${MAIL_PASSWORD}" >> /app/.env
echo "MAIL_HELO_NAME=${MAIL_HELO_NAME}" >> /app/.env
echo "DATABASE_URL=postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${DB_HOST}:5432/${POSTGRES_DB}" >> /app/.env
echo "Launching Plume..."
exec "$@"
......@@ -2,7 +2,7 @@ ADMIN_USER=picasoft
ADMIN_NAME=Picasoft
ADMIN_PASS=pica2020pica
MAIL_SERVER=smtp.example.org
MAIL_SERVER=mail.picasoft.net
#MAIL_USER=example
#MAIL_PASSWORD=123456
#MAIL_HELO_NAME=example.org
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment