build-configs(update)
This commit is contained in:
parent
00bf6e4271
commit
53196369ee
2 changed files with 30 additions and 10 deletions
10
Dockerfile
10
Dockerfile
|
@ -45,16 +45,6 @@ COPY --chown=app:app tools/docker/images/php/root /
|
|||
ENTRYPOINT ["/usr/local/bin/docker-entrypoint-php"]
|
||||
CMD ["php-fpm"]
|
||||
|
||||
################################################################################
|
||||
|
||||
FROM base AS test
|
||||
|
||||
COPY --chown=app:app . .
|
||||
|
||||
RUN parallel-lint src --no-progress \
|
||||
&& phpcs -vv \
|
||||
&& phpstan \
|
||||
&& phpunit --testdox
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -28,6 +28,14 @@ x-app: &default-app
|
|||
tty: true
|
||||
|
||||
services:
|
||||
web:
|
||||
<<: [*default-proxy, *default-app]
|
||||
build:
|
||||
context: .
|
||||
target: web
|
||||
depends_on:
|
||||
- php
|
||||
profiles: [web]
|
||||
|
||||
php:
|
||||
<<: *default-app
|
||||
|
@ -38,8 +46,30 @@ services:
|
|||
- "DOCKER_UID=${DOCKER_UID:-1000}"
|
||||
volumes:
|
||||
- .:/app
|
||||
depends_on:
|
||||
- database
|
||||
profiles: [php]
|
||||
|
||||
database:
|
||||
image: mariadb:10
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: "${DOCKER_MYSQL_CPUS:-0}"
|
||||
memory: "${DOCKER_MYSQL_MEMORY:-0}"
|
||||
volumes:
|
||||
- db-data:/var/lib/mysql
|
||||
|
||||
env_file:
|
||||
- .env
|
||||
labels:
|
||||
- "traefik.enabled=false"
|
||||
environment:
|
||||
MYSQL_RANDOM_ROOT_PASSWORD: true
|
||||
profiles: [database]
|
||||
|
||||
volumes:
|
||||
db-data: {}
|
||||
networks:
|
||||
web:
|
||||
name: traefik_proxy
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue