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.
This commit is contained in:
parent
5bc1eb9e32
commit
50dc96ab9a
|
@ -0,0 +1,5 @@
|
|||
#Inspired from https://github.com/koel/koel/blob/master/.gitpod.dockerfile
|
||||
|
||||
FROM gitpod/workspace-mysql:latest
|
||||
|
||||
ENV APACHE_DOCROOT_IN_REPO="server"
|
|
@ -0,0 +1,34 @@
|
|||
#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;
|
|
@ -1,5 +1,5 @@
|
|||
# allerta-vvf
|
||||
[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fallerta-vvf%2Fallerta-vvf.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2Fallerta-vvf%2Fallerta-vvf?ref=badge_shield) ![PHP Code Testing](https://github.com/allerta-vvf/allerta-vvf/workflows/PHP%20Code%20Testing/badge.svg) ![Languages count](https://img.shields.io/github/languages/count/allerta-vvf/allerta-vvf) ![Top language](https://img.shields.io/github/languages/top/allerta-vvf/allerta-vvf) ![GitHub issues](https://img.shields.io/github/issues-raw/allerta-vvf/allerta-vvf) ![GitHub pull requests](https://img.shields.io/github/issues-pr-raw/allerta-vvf/allerta-vvf) ![GitHub stars](https://img.shields.io/github/stars/allerta-vvf/allerta-vvf?style=social)
|
||||
[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fallerta-vvf%2Fallerta-vvf.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2Fallerta-vvf%2Fallerta-vvf?ref=badge_shield) ![PHP Code Testing](https://github.com/allerta-vvf/allerta-vvf/workflows/PHP%20Code%20Testing/badge.svg) ![Languages count](https://img.shields.io/github/languages/count/allerta-vvf/allerta-vvf) ![Top language](https://img.shields.io/github/languages/top/allerta-vvf/allerta-vvf) ![GitHub issues](https://img.shields.io/github/issues-raw/allerta-vvf/allerta-vvf) ![GitHub pull requests](https://img.shields.io/github/issues-pr-raw/allerta-vvf/allerta-vvf) ![GitHub stars](https://img.shields.io/github/stars/allerta-vvf/allerta-vvf?style=social) [![Gitpod ready-to-code](https://img.shields.io/badge/Gitpod-ready--to--code-blue?logo=gitpod)](https://gitpod.io/#https://github.com/allerta-vvf/allerta-vvf)
|
||||
|
||||
**Coming soon, stay tuned!** :thumbsup:
|
||||
|
||||
|
|
Loading…
Reference in New Issue