-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathafter.sh
80 lines (63 loc) · 2.75 KB
/
after.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
#!/bin/sh
# If you would like to do some extra provisioning you may
# add any commands you wish to this file and they will
# be run after the Homestead machine is provisioned.
#
# If you have user-specific configurations you would like
# to apply, you may also create user-customizations.sh,
# which will be run after this script.
# If you're not quite ready for Node 12.x
# Uncomment these lines to roll back to
# v11.x or v10.x
# Remove Node.js v12.x:
#sudo apt-get -y purge nodejs
#sudo rm -rf /usr/lib/node_modules/npm/lib
#sudo rm -rf //etc/apt/sources.list.d/nodesource.list
# Install Node.js v11.x
#curl -sL https://deb.nodesource.com/setup_11.x | sudo -E bash -
#sudo apt-get install -y nodejs
# Install Node.js v10.x
#curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
#sudo apt-get install -y nodejs
# Refresh packages & upgrade to latest stuff
sudo apt-get update
sudo apt-get -y upgrade
# Useful packages
sudo apt-get -y install emacs-nox
# Necessary packages
sudo apt-get -y install exiftool
# Elasticsearch
sudo wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -
echo "deb https://artifacts.elastic.co/packages/7.x/apt stable main" | sudo tee /etc/apt/sources.list.d/elastic-7.x.list
sudo apt-get -y install elasticsearch
# Increase service startup timeout
sudo mkdir /etc/systemd/system/elasticsearch.service.d
echo -e '[Service]\nTimeoutStartSec=600' | sudo tee /etc/systemd/system/elasticsearch.service.d/startup-timeout.conf
sudo systemctl daemon-reload
sudo systemctl enable elasticsearch.service
sudo systemctl start elasticsearch.service
# Allow bigger file uploads
sudo echo "client_max_body_size 20M;" > /etc/nginx/conf.d/nginx.conf
sudo systemctl reload nginx
# More elbow-room for Composer
# sudo echo "memory_limit = 4096M" > /etc/php/7.4/mods-available/30-matt-increase-memory.ini
sudo bash -c 'echo "memory_limit = 4096M" > /etc/php/7.4/mods-available/increase_php_cli_memory.ini'
sudo phpenmod -v 7.4 -s cli increase_php_cli_memory
# Let's have the command-line back to 7.4, too; Doctrine migrations were failing with 8
# https://laracasts.com/discuss/channels/servers/vagranthomestead-setting-up-multiple-php-versions
# https://github.com/doctrine/DoctrineMigrationsBundle/issues/393
sudo ln -sf /usr/bin/php7.4 /usr/bin/php
# And enable the xdebug extension on the cli for phpunit coverage
sudo tee /etc/php/7.4/mods-available/enable_debug_coverage.ini > /dev/null <<EOT
zend_extension=xdebug.so
xdebug.mode=coverage
EOT
sudo phpenmod -v 7.4 -s cli enable_debug_coverage
# APCu is handy
sudo apt-get -y install php-apcu
# Increase elasticsearch service load timeout
sudo tee /etc/systemd/system/elasticsearch.service.d/startup-timeout.conf > /dev/null <<EOT
[Service]
TimeoutStartSec=180
EOT
sudo systemctl daemon-reload