Commit 34936c5c authored by Guillaume Perréal's avatar Guillaume Perréal
Browse files

dev|test: configuration pour servir l'appli avec Docker.

parent 2e270f4b
No related merge requests found
Showing with 29 additions and 1 deletion
+29 -1
/*
!/composer.*
!/src
!/tests
Dockerfile 0 → 100644
FROM composer:1.8 AS vendors
RUN composer global req hirak/prestissimo
ADD composer.* ./
RUN composer install
FROM php:7.1
ADD https://github.com/Yelp/dumb-init/releases/download/v1.2.2/dumb-init_1.2.2_amd64 /usr/local/bin/dumb-init
RUN chmod +x /usr/local/bin/dumb-init
ENTRYPOINT ["/usr/local/bin/dumb-init", "--"]
RUN mkdir /app
WORKDIR /app
COPY --from=vendors /app/vendor ./vendor
COPY src ./src
COPY tests ./tests
CMD ["/usr/local/bin/php", "tests/console", "server:run", "0.0.0.0:80"]
......@@ -116,7 +116,9 @@
"test:composer-validate": "composer validate",
"test:composer-require": "vendor/bin/composer-require-checker check",
"test:security": "test '!' -s composer.lock || vendor/bin/security-checker security:check",
"test:console": "@php tests/console"
"test:console": "@php tests/console",
"dev:serve": "tests/console server:run -v",
"dev:docker-serve": "docker run --rm -v \"$PWD/src:/app/src:ro\" -v \"$PWD/tests:/app/tests:ro\" $(docker build . -q)"
},
"scripts-descriptions": {
"fix-cs": "Applique les corrections automatiques de style.",
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment