-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Vagrant with ansible #81
base: master
Are you sure you want to change the base?
Changes from all commits
daf1e57
0c32f30
a12542f
c5f68f1
f87b522
451bdb0
c1d95e2
3f66190
d5dc754
ad75ad4
94dace5
31e0e44
d97585e
af17357
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
.vagrant/ | ||
*.log | ||
|
||
/app/bootstrap.php.cache | ||
/app/config/parameters.yml | ||
/build/ | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
Vagrant.configure("2") do |config| | ||
config.vm.box = "ubuntu/bionic64" | ||
|
||
unless Vagrant.has_plugin?("vagrant_hostupdater") | ||
config.vm.hostname = "mental.www" | ||
end | ||
|
||
config.vm.network "private_network", ip: "192.168.179.2" | ||
config.vm.network "forwarded_port", guest: 80, host: 8888 | ||
|
||
config.vm.synced_folder ".", "/srv/www", :nfs => true | ||
|
||
config.vm.provision "shell", inline: "which python || sudo apt -y install python" | ||
|
||
config.vm.provision "ansible" do |ansible| | ||
ansible.playbook = "ansible/playbook.yml" | ||
end | ||
|
||
end |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
default |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
- hosts: all | ||
become: yes | ||
vars_files: | ||
- vars/main.yml | ||
roles: | ||
- { role: geerlingguy.nginx } | ||
- { role: geerlingguy.mysql } | ||
- { role: geerlingguy.php } | ||
- { role: geerlingguy.composer } | ||
dragonito marked this conversation as resolved.
Show resolved
Hide resolved
|
||
- { role: ocha.yarn } | ||
- { role: memcached } | ||
- { role: initproject } |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
- geerlingguy.mysql | ||
- geerlingguy.nginx | ||
- geerlingguy.php | ||
- geerlingguy.php-versions | ||
- ocha.yarn | ||
- geerlingguy.composer |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- | ||
- composer: | ||
command: install | ||
working_dir: /srv/www/ | ||
|
||
- name: create database | ||
command: bin/console do:da:cr --if-not-exists | ||
args: | ||
chdir: /srv/www/ | ||
|
||
- name: run migrations | ||
command: bin/console --no-interaction do:mi:mi | ||
args: | ||
chdir: /srv/www/ |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
--- | ||
- name: install memcached | ||
apt: | ||
name: memcached |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
mysql_root_password: root | ||
|
||
mysql_databases: | ||
- name: mental | ||
encoding: utf8 | ||
collation: utf8_general_ci | ||
|
||
mysql_users: | ||
- name: root | ||
host: "%" | ||
password: root | ||
priv: "mental.*:ALL" | ||
|
||
nginx_vhosts: | ||
- listen: "443 ssl http2" | ||
server_name: "mental.www" | ||
root: "/srv/www/web" | ||
index: "app_dev.php" | ||
state: "present" | ||
template: "{{ nginx_vhost_template }}" | ||
filename: "mental.www.conf" | ||
extra_parameters: | | ||
location / { | ||
try_files $uri /app.php$is_args$args; | ||
} | ||
location ~ ^/(app_dev|config)\.php(/|$) { | ||
fastcgi_split_path_info ^(.+\.php)(/.*)$; | ||
fastcgi_pass 127.0.0.1:9000; | ||
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name; | ||
fastcgi_param DOCUMENT_ROOT $realpath_root; | ||
include fastcgi_params; | ||
} | ||
location ~ \.php$ { | ||
return 404; | ||
} | ||
ssl_certificate /etc/ssl/certs/ssl-cert-snakeoil.pem; | ||
ssl_certificate_key /etc/ssl/private/ssl-cert-snakeoil.key; | ||
ssl_protocols TLSv1.1 TLSv1.2; | ||
ssl_ciphers HIGH:!aNULL:!MD5; | ||
|
||
php_packages_state: "latest" | ||
php_webserver_daemon: "nginx" | ||
php_version: "7.2" | ||
php_default_version_debian: "7.2" | ||
php_enable_php_fpm: true | ||
php_memory_limit: "128M" | ||
php_max_execution_time: "90" | ||
php_upload_max_filesize: "256M" | ||
php_packages: | ||
- php | ||
- php-fpm | ||
- php-cli | ||
- php-common | ||
- php-gd | ||
- php-mbstring | ||
- php-pdo | ||
- php-xml | ||
- php-mysql | ||
- php-apcu | ||
- php-curl | ||
- php-memcached | ||
- php-zip |
Original file line number | Diff line number | Diff line change | ||
---|---|---|---|---|
@@ -0,0 +1,23 @@ | ||||
parameters: | ||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. you will need to change Line 41 in b0391a9
To make travis use this file, Scrutinizer is configured within scrutinizer, I think - will have to check There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. scrutinizer automatically uses
so I would really prefer keeping the dist.yml as template as well as for the tests (travis, scrutinizer) and your setup using a different file or |
||||
database_driver: pdo_mysql | ||||
database_host: 127.0.0.1 | ||||
database_port: ~ | ||||
database_name: mental | ||||
database_name_testing: symfony | ||||
database_user: root | ||||
database_password: ~ | ||||
database_platform: 5.6 | ||||
|
||||
mailer_transport: smtp | ||||
mailer_host: localhost | ||||
mailer_user: ~ | ||||
mailer_password: ~ | ||||
|
||||
locale: en | ||||
secret: Ohthaechoosheekohngov2iepaothae5ahd5ya9kie | ||||
|
||||
session_memcache_host: localhost | ||||
session_memcache_port: 11211 | ||||
session_memcache_prefix: mn_sess | ||||
session_memcache_expire: 604800 # 1 week | ||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does this even render in Markdown? some combination of inline code block and fenced code block? to see what I was talking about? https://raw.githubusercontent.com/tolry/talkly/master/README.md