Skip to content

Commit

Permalink
Merge pull request #49 from andrey-mokhov/improve-examples
Browse files Browse the repository at this point in the history
Improve docker images for examples
  • Loading branch information
andrey-mokhov committed Dec 26, 2023
2 parents e0f3c8e + cc7aebf commit b0a0dfa
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 14 deletions.
9 changes: 2 additions & 7 deletions examples/spiral/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
ARG RR_VERSION
ARG RR_IMAGE=spiralscout/roadrunner:${RR_VERSION}
ARG PHP_IMAGE_VERSION
ARG PHP_IMAGE=php:${PHP_IMAGE_VERSION}
FROM spiralscout/roadrunner:2023.3.8 as rr

FROM ${RR_IMAGE} as rr

FROM ${PHP_IMAGE}
FROM php:8.1-cli-alpine3.18

# Copy Composer
COPY --from=composer:2 /usr/bin/composer /usr/bin/composer
Expand Down
3 changes: 0 additions & 3 deletions examples/spiral/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@ services:
user: ${UID}
build:
dockerfile: Dockerfile
args:
PHP_IMAGE_VERSION: ${PHP_IMAGE_VERSION}
RR_VERSION: ${RR_VERSION}
environment:
PHP_IDE_CONFIG: serverName=graphql-example.local
XDEBUG_MODE: debug
Expand Down
4 changes: 0 additions & 4 deletions examples/spiral/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,11 @@
MAKEFLAGS += --no-print-directory

.EXPORT_ALL_VARIABLES:
PHP_IMAGE_VERSION := 8.1-cli-alpine3.18
RR_VERSION := 2023.3.8
ROOT_DIR := $(shell pwd)

install:
@cp .env.sample .env
@echo "UID=$(shell id -u)" >> .env
@echo "PHP_IMAGE_VERSION=$PHP_IMAGE_VERSION" >> .env
@echo "RR_VERSION=$RR_VERSION" >> .env
@docker-compose build
@make composer_install
@docker run -ti --rm -v ${ROOT_DIR}:/data graphql-spiral:local sh -c "cd /data && php app.php encrypt:key --no-ansi -n -m .env"
Expand Down

0 comments on commit b0a0dfa

Please sign in to comment.