Compare commits

...

2 Commits

Author SHA1 Message Date
Ben fdd746de32
Add nextcloud logging config in run.sh 2022-04-23 14:00:56 +02:00
Ben 5a8c3920e1
Fetch tickets after creating example content 2022-04-23 13:59:10 +02:00
2 changed files with 14 additions and 4 deletions

9
run.sh
View File

@ -18,6 +18,7 @@ fi
# replace containers
if $CONTAINER_RUNTIME inspect --type container synapse 1> /dev/null; then
$CONTAINER_RUNTIME rm -f synapse
sleep 0.5
fi
if $CONTAINER_RUNTIME inspect --type container nextcloud 1> /dev/null; then
$CONTAINER_RUNTIME rm -f nextcloud
@ -35,6 +36,8 @@ $CONTAINER_RUNTIME run -d \
--add-host "synapse:127.0.0.1" \
docker.io/nextcloud
echo -e "Nextcloud has started. \e[1;38;5;2mOK\033[0m"
$CONTAINER_RUNTIME exec nextcloud bash -c 'apt-get update && apt-get install -y git'
$CONTAINER_RUNTIME exec nextcloud chown -R 33 /var/www/html/custom_apps
@ -47,8 +50,11 @@ fi
$CONTAINER_RUNTIME exec --user 33 nextcloud bash -c 'cd /var/www/html/custom_apps/upschooling && make composer'
$CONTAINER_RUNTIME exec --user 33 nextcloud php occ maintenance:install --database sqlite --admin-user admin --admin-pass admin
$CONTAINER_RUNTIME exec --user 33 nextcloud php occ config:system:set --value=true --type=boolean debug
$CONTAINER_RUNTIME exec --user 33 nextcloud php occ log:manage --level=debug
$CONTAINER_RUNTIME exec --user 33 nextcloud php occ app:enable --force upschooling
echo -e "Nextcloud and app was configured. \e[1;38;5;2mOK\033[0m"
SYNAPSE_DATA_VOLUME_EXISTS="false"
if [[ $RUNTIME_IS_PODMAN == "true" ]]; then
if $CONTAINER_RUNTIME volume exists synapse-data; then
@ -121,3 +127,6 @@ if [[ "$REGISTER_USER_SUCCESS" != "0" ]]; then
else
echo -e "Matrix user @upschooling:synapse created. \e[1;38;5;2mOK\033[0m"
fi
# for nextcloud logs use $CONTAINER_RUNTIME exec --user 33 -it nextcloud ./occ log:watch
# for webserver logs use $CONTAINER_RUNTIME logs -f elementweb

View File

@ -46,13 +46,14 @@ export default {
$route: 'fetchTickets',
},
created() {
this.createExampleContent()
this.fetchTickets()
this.createExampleContent().finally(() => {
this.fetchTickets()
})
},
methods: {
createExampleContent() {
async createExampleContent() {
// this obviously shouldn't survive version 1.0
axios.post(
await axios.post(
'api/v1/tickets',
{ title: 'Ein Ticket', content: 'Ein Beispiel' },
{ headers: { 'Content-Type': 'application/json', Accept: 'application/json' } },