mirror of
https://github.com/YunoHost/ynh-dev.git
synced 2024-09-03 20:05:59 +02:00
[enh] './ynh-dev start app' to get app dev env
This commit is contained in:
parent
be9dac2cf2
commit
3770d70705
3 changed files with 9 additions and 7 deletions
1
Vagrantfile
vendored
1
Vagrantfile
vendored
|
@ -9,6 +9,7 @@ NETWORK = "10.0.3."
|
|||
HOSTS = {
|
||||
"ynh-dev" => ["83", "ynh-dev"],
|
||||
"ynh-dev-buster" => ["84", "ynh-dev-buster"],
|
||||
"app" => ["85", "ynh-dev-app"],
|
||||
}
|
||||
|
||||
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
||||
|
|
11
prebuild/Vagrantfile
vendored
11
prebuild/Vagrantfile
vendored
|
@ -25,7 +25,7 @@ sudo apt-get -y --force-yes dist-upgrade
|
|||
|
||||
# Install YunoHost
|
||||
wget https://raw.githubusercontent.com/YunoHost/install_script/stretch/install_yunohost -q -O /tmp/install_yunohost
|
||||
sudo bash /tmp/install_yunohost -a -d unstable
|
||||
sudo bash /tmp/install_yunohost -a -d $1
|
||||
|
||||
# Cleanup
|
||||
sudo apt-get clean -y
|
||||
|
@ -34,21 +34,22 @@ SCRIPT
|
|||
NETWORK = "10.0.3."
|
||||
|
||||
HOSTS = {
|
||||
"ynh-dev" => ["83", "stretch64"],
|
||||
"ynh-dev-buster" => ["84", "testing64"],
|
||||
"ynh-dev" => ["83", "stretch64", "unstable"],
|
||||
"ynh-dev-buster" => ["84", "testing64", "unstable"],
|
||||
"ynh-dev-app" => ["85", "stretch64", "stable"],
|
||||
}
|
||||
|
||||
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
||||
|
||||
HOSTS.each do | (name, cfg) |
|
||||
|
||||
ipaddr, box = cfg
|
||||
ipaddr, box, ynh_version = cfg
|
||||
|
||||
config.vm.define name do |machine|
|
||||
machine.vm.box = "debian/" + box
|
||||
machine.vm.provision "shell" do |s|
|
||||
s.inline = $script
|
||||
s.args = ""
|
||||
s.args = [ynh_version]
|
||||
end
|
||||
machine.vm.provider "lxc" do |lxc|
|
||||
machine.vm.network :private_network, ip: NETWORK + ipaddr, lxc__bridge_name: 'lxcbr0'
|
||||
|
|
4
ynh-dev
4
ynh-dev
|
@ -165,7 +165,7 @@ function rebuild_ynhdev()
|
|||
{
|
||||
check_lxc_setup
|
||||
|
||||
local BOX="ynh-dev"
|
||||
local BOX=${1:-ynh-dev}
|
||||
|
||||
set -x
|
||||
cd prebuild
|
||||
|
@ -184,7 +184,7 @@ function rebuild_ynhdev()
|
|||
|
||||
# User message, and exit
|
||||
info "The Vagrant box was packaged to /tmp/$BOX.box"
|
||||
info "You might want to run : vagrant box add 'yunohost/ynh-dev' /tmp/$BOX.box --force"
|
||||
info "You might want to run : vagrant box add 'yunohost/$BOX' /tmp/$BOX.box --force"
|
||||
}
|
||||
|
||||
function show_vm_ip()
|
||||
|
|
Loading…
Add table
Reference in a new issue