Skip to content

Commit

Permalink
Merge pull request #131 from shopware/add-new-version-of-recipe
Browse files Browse the repository at this point in the history
feat: add new version of docker recipe
  • Loading branch information
shyim authored Oct 5, 2024
2 parents a3cd418 + ceff58a commit 386aa6c
Show file tree
Hide file tree
Showing 6 changed files with 79 additions and 0 deletions.
19 changes: 19 additions & 0 deletions shopware/docker/0.2/config/packages/docker.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
shopware:
api:
jwt_key:
use_app_secret: true
auto_update:
enabled: false
store:
frw: false
admin_worker:
enable_admin_worker: false
enable_notification_worker: false
enable_queue_stats_worker: false
mail:
update_mail_variables_on_send: false
increment:
user_activity:
type: 'array'
message_queue:
type: 'array'
19 changes: 19 additions & 0 deletions shopware/docker/0.2/config/packages/prod/monolog.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
monolog:
handlers:
main:
type: fingers_crossed
action_level: error
handler: nested
excluded_http_codes: [404, 405]
buffer_size: 50
nested:
type: stream
path: php://stderr
level: error
formatter: monolog.formatter.json
console:
type: console
process_psr_3_messages: false
channels: ["!event", "!doctrine"]
business_event_handler_buffer:
level: error
5 changes: 5 additions & 0 deletions shopware/docker/0.2/config/packages/trusted_env.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
parameters:
env(TRUSTED_PROXIES): ''

framework:
trusted_proxies: '%env(TRUSTED_PROXIES)%'
25 changes: 25 additions & 0 deletions shopware/docker/0.2/docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#syntax=docker/dockerfile:1.4

# pin versions
FROM shopware/docker-base:8.3 as base-image
FROM ghcr.io/friendsofshopware/shopware-cli:latest-php-8.3 as shopware-cli

# build

FROM shopware-cli as build

ARG SHOPWARE_PACKAGES_TOKEN

ADD . /src
WORKDIR /src

RUN --mount=type=secret,id=composer_auth,dst=/src/auth.json \
--mount=type=cache,target=/root/.composer \
--mount=type=cache,target=/root/.npm \
/usr/local/bin/entrypoint.sh shopware-cli project ci /src

# build final image

FROM base-image

COPY --from=build --chown=82 --link /src /var/www/html
6 changes: 6 additions & 0 deletions shopware/docker/0.2/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"copy-from-recipe": {
"docker/": "docker/",
"config/": "%CONFIG_DIR%/"
}
}
5 changes: 5 additions & 0 deletions shopware/docker/0.2/post-install.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
* <fg=blue>Setup</>
This recipe has created a <comment>docker/Dockerfile</comment> with an example file to build a Shopware Docker image.
You can build it with <comment>docker build -t <name> -f docker/Dockerfile .</comment>.
Make sure you to set a correct `APP_SECRET`, you can generate one with `openssl rand -hex 128`
See https://github.com/shopware/docker for the complete documentation to configure things.

0 comments on commit 386aa6c

Please sign in to comment.