Skip to content

Commit

Permalink
feat(bump): Upgrade and remove flex (#154)
Browse files Browse the repository at this point in the history
* feat(bump): Upgrade and remove flex

* Remove api-platform bundles

* Add public bundles to the gitignore
  • Loading branch information
darkweak authored Sep 23, 2022
1 parent 12ff5c4 commit 7a26935
Show file tree
Hide file tree
Showing 35 changed files with 1,184 additions and 4,418 deletions.
5 changes: 2 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,13 @@ init-db:
$(BIN_CONSOLE) do:sc:up --force

install: ## Install and setup project
cp api/.env-dist api/.env
$(MAKE) setup-hosts create-network up jwt composer-install cache
$(MAKE) create-network up jwt composer-install cache
sudo chmod -R 777 api/public/media

initialize: install reset-db ## Initialize and setup the project

jwt: ## Generate jwt
cd api && sh ./generateJWT.sh
sh ./api/generateJWT.sh

load-data:
$(BIN_CONSOLE) ha:fi:load --quiet
Expand Down
19 changes: 19 additions & 0 deletions api/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,22 @@ config/jwt/*.pem
###< phpunit/phpunit ###

public/media/**

###> symfony/framework-bundle ###
/.env.local
/.env.local.php
/.env.*.local
/config/secrets/prod/prod.decrypt.private.php
/public/bundles/
/var/
/vendor/
###< symfony/framework-bundle ###

###> friendsofphp/php-cs-fixer ###
/.php-cs-fixer.php
/.php-cs-fixer.cache
###< friendsofphp/php-cs-fixer ###

###> lexik/jwt-authentication-bundle ###
/config/jwt/*.pem
###< lexik/jwt-authentication-bundle ###
14 changes: 14 additions & 0 deletions api/.php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?php

$finder = (new PhpCsFixer\Finder())
->in(__DIR__)
->exclude('var')
;

return (new PhpCsFixer\Config())
->setRules([
'@Symfony' => true,
])
->setFinder($finder)
->setCacheFile('.php-cs-fixer.cache') // forward compatibility with 3.x line
;
6 changes: 3 additions & 3 deletions api/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,9 @@ RUN set -eux; \
# https://getcomposer.org/doc/03-cli.md#composer-allow-superuser
ENV COMPOSER_ALLOW_SUPERUSER=1
# install Symfony Flex globally to speed up download of Composer packages (parallelized prefetching)
RUN set -eux; \
composer global require "symfony/flex" --prefer-dist --no-progress --no-suggest --classmap-authoritative; \
composer clear-cache
# RUN set -eux; \
# composer global require "symfony/flex" --prefer-dist --no-progress --no-suggest --classmap-authoritative; \
# composer clear-cache
ENV PATH="${PATH}:/root/.composer/vendor/bin"

WORKDIR /srv/api
Expand Down
3 changes: 2 additions & 1 deletion api/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,8 @@
"extra": {
"symfony": {
"allow-contrib": false,
"require": "5.1.*"
"require": "5.1.*",
"docker": true
}
}
}
Loading

0 comments on commit 7a26935

Please sign in to comment.