Configure mysql service (https://hub.docker.com/_/mysql/)

fairwalter_staging /var/www/fairwalter.dev.cytex.ch/app/Resources/templates:

fairwalter-dev /var/www/fairwalter.dev.cytex.ch/app/Resources/templates:

fairwalter-prod /var/www/app.fairwalter.ch/app/Resources/templates

New application: Stage:

/var/www/new.fairwalter.ch/html/ https://new.fairwalter.ch

nginx server_name: new.fairwalter.ch; nginx: /etc/nginx/sites-enabled/new.fairwalter.ch nginx root: /var/www/new.fairwalter.ch/html/public;

Old application: nginx server_name: fairwalter-ms5.dev.cytex.ch nginx .conf: /etc/nginx/sites-enabled/fairwalter-ms5.dev.cytex.ch nginx root: /var/www/fairwalter-ms5.dev.cytex.ch/web

nginx server_name: fairwalter.dev.cytex.ch nginx .conf: /etc/nginx/sites-enabled/fairwalter.dev.cytex.ch nginx root: /var/www/fairwalter.dev.cytex.ch/web


*.n.fairwalter.ch

t.n.fairwalter.ch

How to create a new site for Symfony 4:

Našao sam grešku!


database=mysql://fairnew:8rTxDQauR5hFzU2y@localhost:3306/fairwalter_v2

site=t.n.fairwalter.ch
root=/var/www/t.n.fairwalter.ch
database=mysql://fairnew:8rTxDQauR5hFzU2y@localhost:3306/fairwalter_v2
env=prod

There is prepared nginx configuration file that we will use as template:

/etc/nginx/sites-available/default-symfony4 

So, type the following:

sudo -u www-data mkdir -p -m 775 /var/www/$site/{web,web/public,log}
sudo cp /etc/nginx/sites-available/default-symfony4 /etc/nginx/sites-available/$site

sudo sed -i -r "s|::SERVER:NAME::|$site|" /etc/nginx/sites-available/$site
sudo sed -i -r "s|::SERVER:ROOT::|$root|" /etc/nginx/sites-available/$site
sudo sed -i -r "s|::ENV:APP_ENV::|$env|" /etc/nginx/sites-available/$site

sudo ln -s /etc/nginx/sites-available/$site /etc/nginx/sites-enabled/

sudo certbot --nginx -d $site -n --redirect
sudo nginx -t && sudo nginx -s reload

# don't forget to add environment specific, for example
echo "DATABASE_URL=$database" | sudo -u www-data tee /var/www/$site/web/.env.$env.local

services:

  • mysql

variables:

Configure mysql service (https://hub.docker.com/_/mysql/)

MYSQL_DATABASE: hello_world_test MYSQL_ROOT_PASSWORD: mysql

edit u tabovima: http://fairwalter.test/contracts/list dodavanje galerije u edit i u add: http://fairwalter.test/damages/list (damage.gallery) U add već imam… slika u datatable: http://fairwalter.test/announcements/list

date 01. Jan 0001 | modified 28. May 2021
filename: Temp » Gitlab