Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
www.domainepublic.net
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
domainepublic
www.domainepublic.net
Commits
2c54bb8f
Commit
2c54bb8f
authored
Mar 16, 2017
by
Christophe Siraut
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add Vagrantfile
parent
8f1736e4
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
71 additions
and
2 deletions
+71
-2
.gitignore
.gitignore
+4
-2
Vagrantfile
Vagrantfile
+12
-0
bin/bootstrap_vagrant
bin/bootstrap_vagrant
+55
-0
No files found.
.gitignore
View file @
2c54bb8f
config/connect.php
tmp
test
junk
stats
IMG/cache*
IMG/distant
IMG/pdf
IMG/ps
local/cache*
stats
junk
guide-admin
2014
NAVPICS
dpsite2
squelettes-old
domainepublic.sql
.vagrant
Vagrantfile
0 → 100644
View file @
2c54bb8f
# -*- mode: ruby -*-
# vi: set ft=ruby :
# For a complete reference, please see the online documentation at
# https://docs.vagrantup.com.
Vagrant
.
configure
(
"2"
)
do
|
config
|
config
.
vm
.
box
=
"debian/jessie64"
config
.
vm
.
provision
:shell
,
path:
"bin/bootstrap_vagrant"
config
.
vm
.
network
"forwarded_port"
,
guest:
80
,
host:
8000
end
bin/bootstrap_vagrant
0 → 100755
View file @
2c54bb8f
#! /usr/bin/env bash
# Variables
DBHOST
=
localhost
DBNAME
=
domainepublic
DBUSER
=
user
DBPASSWD
=
password
apt-get
-qq
update
apt-get
-y
install
vim
echo
"--- Install MySQL specific packages and settings ---"
debconf-set-selections
<<<
"mysql-server mysql-server/root_password password
$DBPASSWD
"
debconf-set-selections
<<<
"mysql-server mysql-server/root_password_again password
$DBPASSWD
"
#debconf-set-selections <<< "phpmyadmin phpmyadmin/dbconfig-install boolean true"
#debconf-set-selections <<< "phpmyadmin phpmyadmin/app-password-confirm password $DBPASSWD"
#debconf-set-selections <<< "phpmyadmin phpmyadmin/mysql/admin-pass password $DBPASSWD"
#debconf-set-selections <<< "phpmyadmin phpmyadmin/mysql/app-pass password $DBPASSWD"
#debconf-set-selections <<< "phpmyadmin phpmyadmin/reconfigure-webserver multiselect none"
apt-get
-y
install
mysql-server
#phpmyadmin
echo
"--- Setup our MySQL user and db ---"
mysql
-uroot
-p
$DBPASSWD
-e
"CREATE DATABASE
$DBNAME
"
mysql
-uroot
-p
$DBPASSWD
-e
"grant all privileges on
$DBNAME
.* to '
$DBUSER
'@'localhost' identified by '
$DBPASSWD
'"
echo
"--- Install PHP packages ---"
apt-get
-y
install
apache2 php5 libapache2-mod-php5
echo
"--- Install spip dependencies ---"
apt-get
-y
install
php5-mysql php5-imagick php5-gd netpbm
echo
"--- Enable mod-rewrite ---"
a2enmod rewrite
echo
"--- Allow Apache override to all ---"
sed
-i
"s/AllowOverride None/AllowOverride All/g"
/etc/apache2/apache2.conf
echo
"--- Set document root to public directory ---"
rm
-rf
/var/www/html
ln
-fs
/vagrant /var/www/html
echo
"--- Display PHP errors ---"
sed
-i
"s/error_reporting = .*/error_reporting = E_ALL/"
/etc/php5/apache2/php.ini
sed
-i
"s/display_errors = .*/display_errors = On/"
/etc/php5/apache2/php.ini
echo
"--- Create Spip connect.php and folders---"
[
-f
/vagrant/config/connect.php
]
||
cp
/vagrant/config/connect-example.php /vagrant/config/connect.php
[
-d
/vagrant/tmp/cache/xml
]
||
mkdir
-p
/vagrant/tmp/cache/xml/
echo
"--- Import Spip database ---"
[
-f
/vagrant/domainepublic.sql
]
||
scp ginger.domainepublic.net:/srv/domainepublic.sql /vagrant/
mysql
-uroot
-p
$DBPASSWD
$DBNAME
< /vagrant/domainepublic.sql
echo
"--- Restart Apache ---"
service apache2 restart
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment