-
Notifications
You must be signed in to change notification settings - Fork 339
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d2735ad
commit 5420ff2
Showing
19 changed files
with
142 additions
and
406 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
services: | ||
mysql: | ||
ports: | ||
- "3306:3306" | ||
nginx: | ||
ports: | ||
- "80:80" | ||
mailhog: | ||
ports: | ||
- "8025:8025" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
.PHONY: run | ||
|
||
DOCKER_USER ?= "$(shell id -u):$(shell id -g)" | ||
ENV ?= "dev" | ||
|
||
init: | ||
@if [ ! -e compose.override.yml ]; then \ | ||
cp compose.override.dist.yml compose.override.yml; \ | ||
fi | ||
@ENV=$(ENV) DOCKER_USER=$(DOCKER_USER) docker-compose run --rm php composer install --no-interaction --no-scripts | ||
@ENV=$(ENV) DOCKER_USER=$(DOCKER_USER) docker-compose run --rm nodejs | ||
@ENV=$(ENV) DOCKER_USER=$(DOCKER_USER) docker-compose run --rm php bin/console sylius:install -s default -n | ||
@ENV=$(ENV) DOCKER_USER=$(DOCKER_USER) docker-compose up -d | ||
|
||
run: | ||
@ENV=$(ENV) DOCKER_USER=$(DOCKER_USER) docker-compose up -d | ||
|
||
debug: | ||
@ENV=$(ENV) DOCKER_USER=$(DOCKER_USER) docker-compose -f compose.yml -f compose.override.yml -f compose.debug.yml up -d | ||
|
||
stop: | ||
@ENV=$(ENV) DOCKER_USER=$(DOCKER_USER) docker-compose stop | ||
|
||
down: | ||
@ENV=$(ENV) DOCKER_USER=$(DOCKER_USER) docker-compose down | ||
|
||
clean: | ||
@ENV=$(ENV) DOCKER_USER=$(DOCKER_USER) docker-compose down -v |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
services: | ||
php: | ||
image: piotrkardasz/sylius-php:8.2-fixuid-xdebug-alpine | ||
environment: | ||
APP_DEBUG: 1 | ||
MAILER_URL: smtp://mailhog:1025 | ||
XDEBUG_MODE: debug | ||
XDEBUG_CONFIG: >- | ||
client_host=host.docker.internal | ||
client_port=9003 | ||
log=/dev/stdout | ||
# This should correspond to the server declared in PHPStorm `Preferences | Languages & Frameworks | PHP | Servers` | ||
# Then PHPStorm will use the corresponding path mappings | ||
PHP_IDE_CONFIG: serverName=sylius | ||
extra_hosts: | ||
- "host.docker.internal:host-gateway" | ||
mailhog: | ||
extends: | ||
service: mailhog | ||
file: ./.docker/ports.yaml | ||
# do not use in production! | ||
image: mailhog/mailhog:latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
version: "3.8" | ||
services: | ||
php: | ||
image: piotrkardasz/sylius-php:8.2-fixuid-alpine | ||
user: ${DOCKER_USER:-1000:1000} | ||
depends_on: | ||
mysql: | ||
condition: service_healthy | ||
environment: | ||
APP_DEBUG: 1 | ||
APP_ENV: ${ENV:-dev} | ||
volumes: | ||
- .:/srv/sylius:rw,cached | ||
# if you develop on Linux, you may use a bind-mounted host directory instead | ||
# - ./var:/srv/sylius/var:rw | ||
- ./public:/srv/sylius/public:rw,delegated | ||
# if you develop on Linux, you may use a bind-mounted host directory instead | ||
# - ./public/media:/srv/sylius/public/media:rw | ||
- public-media:/srv/sylius/public/media:rw | ||
mysql: | ||
extends: | ||
service: mysql | ||
file: ./.docker/ports.yaml | ||
volumes: | ||
- mysql-data:/var/lib/mysql:rw | ||
|
||
nginx: | ||
extends: | ||
service: nginx | ||
file: ./.docker/ports.yaml | ||
volumes: | ||
- ./public:/srv/sylius/public:ro | ||
# if you develop on Linux, you may use a bind-mounted host directory instead | ||
# - ./public/media:/srv/sylius/public/media:ro | ||
- public-media:/srv/sylius/public/media:ro,nocopy | ||
nodejs: | ||
image: node:${NODE_VERSION:-16}-alpine | ||
user: ${DOCKER_USER:-1000:1000} | ||
working_dir: /srv/sylius | ||
entrypoint: [ "/bin/sh","-c" ] | ||
command: | ||
- | | ||
yarn install | ||
yarn build | ||
volumes: | ||
- .:/srv/sylius:rw,cached | ||
- ./public:/srv/sylius/public:rw,delegated | ||
volumes: | ||
mysql-data: | ||
public-media: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
services: | ||
php: | ||
image: piotrkardasz/sylius-php:8.2-alpine | ||
environment: | ||
APP_DEBUG: 0 | ||
APP_ENV: prod | ||
APP_SECRET: EDITME | ||
# DATABASE_URL: mysql://sylius:${MYSQL_PASSWORD}@mysql/sylius_prod | ||
DATABASE_URL: "mysql://root@mysql/sylius_%kernel.environment%" | ||
MAILER_URL: null://null | ||
MESSENGER_TRANSPORT_DSN: doctrine://default | ||
SYLIUS_MESSENGER_TRANSPORT_MAIN_DSN: doctrine://default | ||
SYLIUS_MESSENGER_TRANSPORT_MAIN_FAILED_DSN: doctrine://default?queue_name=main_failed | ||
SYLIUS_MESSENGER_TRANSPORT_CATALOG_PROMOTION_REMOVAL_DSN: doctrine://default?queue_name=catalog_promotion_removal | ||
SYLIUS_MESSENGER_TRANSPORT_CATALOG_PROMOTION_REMOVAL_FAILED_DSN: doctrine://default?queue_name=catalog_promotion_removal_failed | ||
PHP_DATE_TIMEZONE: ${PHP_DATE_TIMEZONE:-UTC} | ||
mysql: | ||
image: mysql:5.7 # Sylius is fully working on mysql 8.0 version | ||
platform: linux/amd64 | ||
healthcheck: | ||
test: '/usr/bin/mysql --execute "SHOW databases;"' | ||
timeout: 3s | ||
interval: 1s | ||
retries: 10 | ||
environment: | ||
MYSQL_ALLOW_EMPTY_PASSWORD: 1 | ||
cap_add: | ||
- SYS_NICE # prevent "mbind: Operation not permitted" errors | ||
nginx: | ||
image: piotrkardasz/sylius-nginx:latest |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.