1
0
mirror of https://github.com/allerta-vvf/allerta-vvf synced 2025-02-20 20:50:44 +01:00
allerta-vvf/.gitpod.yml
MatteoGheza 50dc96ab9a Fully automate dev setup with Gitpod
This commit implements a fully-automated development setup using Gitpod.io, an
online IDE for GitLab, GitHub, and Bitbucket that enables Dev-Environments-As-Code.
This makes it easy for anyone to get a ready-to-code workspace for any branch,
issue or pull request almost instantly with a single click.
2021-03-16 09:49:49 +00:00

34 lines
1.1 KiB
YAML

#Inspired from
image:
file: .gitpod.dockerfile
ports:
- port: 8001
onOpen: open-preview
- port: 3306
onOpen: ignore
tasks:
- name: Apache
command: >
touch /var/log/apache2/error.log;
touch /var/log/apache2/access.log;
multitail /var/log/apache2/error.log -I /var/log/apache2/access.log
- name: Allerta
init: >
cd server;
composer install;
composer update;
cd resources;
npm install;
npm run prod;
cd ../..;
command: >
cd server/install;
WORKSPACE_URL=$(gp url 8001 | sed -E s/\\/$//);
mysql -e "CREATE DATABASE IF NOT EXISTS allerta";
mysql -e "CREATE USER 'allerta'@'localhost' IDENTIFIED BY 'allerta_pwd';";
mysql -e "GRANT ALL PRIVILEGES ON * . * TO 'allerta'@'localhost';";
mysqladmin reload;
php install.php config -n "allerta" -u "allerta" -a "allerta_pwd" -o "127.0.0.1" -r "DEV_ENV";
php install.php populate -m "admin" -b -s "password" -w "owner" -e "mail@mailserver.local";
apachectl start;