Import entries.json into wallabag packer image

This commit is contained in:
Jeremy Dormitzer 2021-01-06 14:07:30 -05:00
parent 91b6dfffe6
commit e127c5c41d
4 changed files with 18 additions and 2 deletions

File diff suppressed because one or more lines are too long

View File

@ -53,7 +53,16 @@
"artifact_id": "nyc1:76466549", "artifact_id": "nyc1:76466549",
"packer_run_uuid": "870a0b80-2ca0-3561-92a3-210b79e7c773", "packer_run_uuid": "870a0b80-2ca0-3561-92a3-210b79e7c773",
"custom_data": null "custom_data": null
},
{
"name": "digitalocean",
"builder_type": "digitalocean",
"build_time": 1609959393,
"files": null,
"artifact_id": "nyc1:76467390",
"packer_run_uuid": "bbdb5c8d-a7c7-9f7b-ea51-efb20dea80d3",
"custom_data": null
} }
], ],
"last_run_uuid": "870a0b80-2ca0-3561-92a3-210b79e7c773" "last_run_uuid": "bbdb5c8d-a7c7-9f7b-ea51-efb20dea80d3"
} }

View File

@ -7,6 +7,7 @@ sudo usermod --shell /bin/bash www-data
git clone https://github.com/wallabag/wallabag.git /var/www/wallabag git clone https://github.com/wallabag/wallabag.git /var/www/wallabag
mv /tmp/wallabag-params.yml /var/www/wallabag/app/config/parameters.yml mv /tmp/wallabag-params.yml /var/www/wallabag/app/config/parameters.yml
chown -R www-data:www-data /var/www/wallabag chown -R www-data:www-data /var/www/wallabag
chown www-data:www-data /tmp/entries.json
sudo -i -u www-data bash << EOF sudo -i -u www-data bash << EOF
set -xe set -xe
@ -14,4 +15,5 @@ set -xe
cd /var/www/wallabag cd /var/www/wallabag
make install make install
php bin/console --env=prod fos:user:create jdormit jeremy.dormitzer@gmail.com "$ADMIN_PASSWORD" --super-admin php bin/console --env=prod fos:user:create jdormit jeremy.dormitzer@gmail.com "$ADMIN_PASSWORD" --super-admin
php bin/console --env=prod wallabag:import --importer=v2 jdormit /tmp/entries.json
EOF EOF

View File

@ -23,6 +23,11 @@
"source": "files/wallabag-params.yml", "source": "files/wallabag-params.yml",
"destination": "/tmp/wallabag-params.yml" "destination": "/tmp/wallabag-params.yml"
}, },
{
"type": "file",
"source": "files/entries.json",
"destination": "/tmp/entries.json"
},
{ {
"type": "shell", "type": "shell",
"environment_vars": [ "environment_vars": [