Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ferror/sylius-image
https://github.com/ferror/sylius-image
Last synced: 5 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/ferror/sylius-image
- Owner: Ferror
- Created: 2022-01-03T22:42:06.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2022-08-03T09:31:13.000Z (over 2 years ago)
- Last Synced: 2024-12-12T12:44:33.355Z (12 days ago)
- Language: Dockerfile
- Size: 38.1 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# sylius-image
## Docker sizes
| Image | Size |
|-------------------|-------------------------------------------------------------------------------------|
| 1.11 | ![Docker Hub](https://badgen.net/docker/size/ferror/sylius-image/1.11) |
| 1.11-headless | ![Docker Hub](https://badgen.net/docker/size/ferror/sylius-image/1.11-headless) |
| 1.11-experimental | ![Docker Hub](https://badgen.net/docker/size/ferror/sylius-image/1.11-experimental) |
| 1.11-roadrunner | ![Docker Hub](https://badgen.net/docker/size/ferror/sylius-image/1.11-roadrunner) |## Example usage
### Production environment
#### Dockerfile```dockerfile
FROM ferror/sylius-image:1.11COPY . /app
RUN composer install --no-scripts
RUN php bin/console cache:warmup --no-debug --env=prod
RUN yarn install --pure-lockfile && yarn build
```In case of memory exhaustion you can increase PHP `memory_limit` config or add `--no-optional-warmers` flag
```dockerfile
RUN php bin/console cache:warmup --no-debug --env=prod --no-optional-warmers
```#### Kubernetes
[https://github.com/ferror/sylius-kubernetes](https://github.com/ferror/sylius-kubernetes)### Development environment
#### Traefik config file```yaml
log:
level: ERRORapi:
insecure: trueentrypoints:
web:
address: :80providers:
docker:
exposedByDefault: true
# https://masterminds.github.io/sprig/strings.html
# Please define your own routing rules based on local domain
defaultRule: "Host(`{{ .Name }}.domain.localhost`)"
```#### Docker Compose
```yaml
services:
traefik:
image: traefik:2.6
ports:
- 80:80 # HTTP
- 443:443 # HTTPS
- 8080:8080 # Traefik UI dashboard
volumes:
- ./.docker/traefik.yaml:/etc/traefik/traefik.yaml
- /var/run/docker.sock:/var/run/docker.sock:ro
networks:
- syliusapp:
image: ferror/sylius-image:1.11
volumes:
- ./:/app:delegated
depends_on:
- traefik
- mysql
- postgres
networks:
- syliusmysql:
image: mysql:5.7
platform: linux/amd64 # mysql does not support arm images :(
environment:
- MYSQL_ROOT_PASSWORD=mysql
# You may want to initialize mysql server with some dump files
# volumes:
# - ./.docker/dev/mysql:/docker-entrypoint-initdb.d:delegated
ports:
- "3306:3306"
depends_on:
- traefik
networks:
- syliuspostgres:
image: postgres:13
environment:
- POSTGRES_USER=root
- POSTGRES_PASSWORD=postgres
# You may want to initialize postgres server with some dump files
# volumes:
# - ./.docker/dev/postgres:/docker-entrypoint-initdb.d:delegated
ports:
- 5432:5432
depends_on:
- traefik
networks:
- syliusnetworks:
sylius:
driver: bridge
```