diff --git a/.template/addons/docker/Dockerfile.tt b/.template/addons/docker/Dockerfile.tt index b4594ff6..68bf0f65 100644 --- a/.template/addons/docker/Dockerfile.tt +++ b/.template/addons/docker/Dockerfile.tt @@ -103,7 +103,9 @@ RUN cp .env.example .env # Compile assets RUN bin/rails assets:precompile -RUN yarn postcss +RUN bundle exec rake i18n:js:export +RUN yarn build +RUN yarn build:css <%- end -%> EXPOSE $PORT diff --git a/.template/variants/web/package.json.rb b/.template/variants/web/package.json.rb index 34dbf40d..0856dd37 100644 --- a/.template/variants/web/package.json.rb +++ b/.template/variants/web/package.json.rb @@ -22,6 +22,8 @@ # TODO: Check again after removing Webpacker, need to use version 8 # https://github.com/bjankord/stylelint-config-sass-guidelines/issues/203#issuecomment-955620774 run 'yarn add --dev postcss@8.4.5' +run 'yarn add --dev postcss-cli@10.1.0' +run 'yarn add --dev postcss-load-config@4.0.1' # Setup scripts run 'npm set-script eslint "eslint . --color"' diff --git a/Makefile b/Makefile index 4015127d..755c4ff3 100644 --- a/Makefile +++ b/Makefile @@ -18,16 +18,19 @@ create_api: build: cd $(APP_NAME) && \ + cp .env.example .env && \ bin/docker-prepare && \ docker-compose -f docker-compose.test.yml build build_production: cd $(APP_NAME) && \ + cp .env.example .env && \ bin/docker-prepare && \ docker-compose build test_variant_app: cd $(APP_NAME) && \ + cp .env.example .env && \ docker-compose -f docker-compose.test.yml run test base_addon_spec = spec/addons/base/**/*_spec.rb @@ -44,6 +47,7 @@ test_template: docker-compose -f docker-compose.test.yml run test bash -c "./bin/inject_port_into_nginx.sh && nginx -c /etc/nginx/conf.d/default.conf -t" && \ docker-compose -f docker-compose.test.yml run --detach test bin/start.sh && \ cd ../.template && \ + cp .env.example .env && \ bundle install; \ if [ $(VARIANT) = web ]; then \ bundle exec rspec --pattern="${base_spec}, ${web_spec}, ${base_addon_spec}, ${web_addon_spec}" --format progress; \