diff --git a/api/.env.dist b/api/.env.dist index 2edbb91..69f196a 100644 --- a/api/.env.dist +++ b/api/.env.dist @@ -2,8 +2,6 @@ # Copy this file to .env file for development, create environment variables when deploying to production # https://symfony.com/doc/current/best_practices/configuration.html#infrastructure-related-configuration -GTM_TAG= - ###> symfony/framework-bundle ### APP_ENV=dev APP_SECRET=1bdf86cdc78fba654e4f2c309c6bbdbd diff --git a/api/config/packages/twig.yaml b/api/config/packages/twig.yaml index da841eb..3b315dc 100644 --- a/api/config/packages/twig.yaml +++ b/api/config/packages/twig.yaml @@ -2,5 +2,3 @@ twig: paths: ['%kernel.project_dir%/templates'] debug: '%kernel.debug%' strict_variables: '%kernel.debug%' - globals: - gtm_tracking: "%env(GTM_TAG)%" diff --git a/docker-compose.yml b/docker-compose.yml index a3a6004..5b7ca4b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -8,7 +8,7 @@ services: volumes: - ./front:/var/www/front:cached - ./api:/var/www/api:cached - - ./docker/nginx/czydojade:/etc/nginx/conf.d/czydojade.conf + - ./docker/nginx/cojedzie.conf:/etc/nginx/conf.d/cojedzie.conf api: build: ./api @@ -18,6 +18,15 @@ services: - ./api:/var/www:cached - ./docker/php/log.conf:/usr/local/etc/php-fpm.d/zz-log.conf + frontend: + image: node:15.2.1 + working_dir: /app + environment: + - APP_API=http://nginx/api + volumes: + - ./front:/app + command: ["node", "build/server.js"] + blackfire: image: blackfire/blackfire ports: ["8707"] diff --git a/docker/nginx/czydojade b/docker/nginx/cojedzie.conf similarity index 83% rename from docker/nginx/czydojade rename to docker/nginx/cojedzie.conf index 54294a0..83bad87 100644 --- a/docker/nginx/czydojade +++ b/docker/nginx/cojedzie.conf @@ -2,8 +2,6 @@ server { root /var/www/front/public/; server_name cojedzie.localhost; - index dist/index.html; - location /api/ { root /var/www/api/public/; try_files $uri $uri/ index.php$is_args$args; @@ -15,7 +13,12 @@ server { } location / { - try_files $uri $uri/ /dist/index.html =404; + try_files $uri $uri/ @frontend; + } + + location @frontend { + proxy_pass http://frontend:3000; + proxy_intercept_errors on; } location ~ (.+).php(/|$) { @@ -30,7 +33,6 @@ server { fastcgi_param APP_ENV "dev"; fastcgi_param DATABASE_URL "sqlite:///%kernel.project_dir%/var/app.db"; - fastcgi_param GTM_TAG "GTM-00000"; internal; } diff --git a/front/resources/manifest.json b/front/resources/manifest.json index 00dd533..7e6fb1e 100644 --- a/front/resources/manifest.json +++ b/front/resources/manifest.json @@ -2,7 +2,7 @@ "name": "Co Jedzie?", "short_name": "Co Jedzie?", "orientation": "portrait", - "lang": "pl_PL", + "lang": "pl-PL", "start_url": "/", "display": "standalone", "background_color": "white",