Skip to content
This repository has been archived by the owner on Nov 8, 2018. It is now read-only.

Change name of container in Make-File #15

Merged
merged 2 commits into from
Oct 22, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
include .stub/*.mk

$(eval $(call defw,DOCKER_COMPOSE_LOCAL,docker-compose.local.yml))
$(eval $(call defw,PROJECT,sylius-standard))
$(eval $(call defw,NAME,$(PROJECT)))

ifneq ("$(wildcard $(DOCKER_COMPOSE_LOCAL))","")
DOCKER_COMPOSE_EXTRA_OPTIONS := -f $(DOCKER_COMPOSE_LOCAL)
Expand All @@ -17,6 +19,7 @@ build:: ##@Docker Build the Sylius application image
up:: ##@Sylius Start the Sylius stack for development (using docker-compose)
docker-compose \
-f docker-compose.yml \
-p $(PROJECT) \
$(DOCKER_COMPOSE_EXTRA_OPTIONS) \
up \
--build
Expand All @@ -25,13 +28,13 @@ up:: ##@Sylius Start the Sylius stack for development (using docker-compose)
shell:: ##@Development Bring up a shell
docker exec \
-ti \
syliusdocker_sylius_1 \
${NAME}-app \
bash

.PHONY: console
console:: ##@Development Call Symfony "console" with "console [<CMD>]"
docker exec \
-ti \
-u www-data \
syliusdocker_sylius_1 \
${NAME}-app \
sylius/bin/console $(CMD)
3 changes: 3 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ version: '2'

services:
sylius:
container_name: ${NAME}-app
build: .
environment:
- SYLIUS_DATABASE_HOST=mysql
Expand All @@ -13,6 +14,7 @@ services:
- 8000:80

mysql:
container_name: ${NAME}-mysql
image: percona:5.7
environment:
MYSQL_ROOT_PASSWORD: sylius
Expand All @@ -23,6 +25,7 @@ services:
- 127.0.0.1:3606:3306

mailhog:
container_name: ${NAME}-mailhog
image: mailhog/mailhog:latest
ports:
- 8025:8025