DONE: put hardcoded app_key for testing
This commit is contained in:
@@ -52,6 +52,7 @@ jobs:
|
|||||||
|
|
||||||
echo "Building and pushing backend: ${TAGS}"
|
echo "Building and pushing backend: ${TAGS}"
|
||||||
docker buildx build \
|
docker buildx build \
|
||||||
|
--target production \
|
||||||
--platform linux/amd64 \
|
--platform linux/amd64 \
|
||||||
--cache-from type=registry,ref=${IMAGE}:buildcache,ignore-error=true \
|
--cache-from type=registry,ref=${IMAGE}:buildcache,ignore-error=true \
|
||||||
--cache-to type=registry,ref=${IMAGE}:buildcache,mode=max \
|
--cache-to type=registry,ref=${IMAGE}:buildcache,mode=max \
|
||||||
|
|||||||
@@ -138,7 +138,11 @@ EXPOSE 80 9000
|
|||||||
# Start supervisor which manages both Nginx and PHP-FPM
|
# Start supervisor which manages both Nginx and PHP-FPM
|
||||||
CMD ["supervisord", "-c", "/etc/supervisor/supervisord.conf"]
|
CMD ["supervisord", "-c", "/etc/supervisor/supervisord.conf"]
|
||||||
|
|
||||||
# CI: install dev dependencies and run PHPUnit (build fails if tests fail)
|
# CI: install dev dependencies and run PHPUnit (build with --target backend-test)
|
||||||
FROM builder AS backend-test
|
FROM builder AS backend-test
|
||||||
|
ENV APP_KEY=base64:2fl3rk3lI6+k9tJ0lZp2aXh6sL9mN4pQ7rT1vW5yZ8A=
|
||||||
RUN composer install --no-interaction --prefer-dist --no-scripts \
|
RUN composer install --no-interaction --prefer-dist --no-scripts \
|
||||||
&& ./vendor/bin/phpunit --no-coverage
|
&& ./vendor/bin/phpunit --no-coverage
|
||||||
|
|
||||||
|
# Default production image target (use --target base for deploy builds)
|
||||||
|
FROM base AS production
|
||||||
|
|||||||
@@ -19,6 +19,7 @@
|
|||||||
</source>
|
</source>
|
||||||
<php>
|
<php>
|
||||||
<env name="APP_ENV" value="testing"/>
|
<env name="APP_ENV" value="testing"/>
|
||||||
|
<env name="APP_KEY" value="base64:2fl3rk3lI6+k9tJ0lZp2aXh6sL9mN4pQ7rT1vW5yZ8A="/>
|
||||||
<env name="APP_MAINTENANCE_DRIVER" value="file"/>
|
<env name="APP_MAINTENANCE_DRIVER" value="file"/>
|
||||||
<env name="BCRYPT_ROUNDS" value="4"/>
|
<env name="BCRYPT_ROUNDS" value="4"/>
|
||||||
<env name="CACHE_STORE" value="array"/>
|
<env name="CACHE_STORE" value="array"/>
|
||||||
|
|||||||
@@ -14,6 +14,6 @@ class ExampleTest extends TestCase
|
|||||||
{
|
{
|
||||||
$response = $this->get('/');
|
$response = $this->get('/');
|
||||||
|
|
||||||
$response->assertStatus(200);
|
$response->assertRedirect('/login');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user