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

Commit

Permalink
Merge pull request #15 from castler/fix_container_name
Browse files Browse the repository at this point in the history
Change name of container in docker-compose.yml via Makefile
  • Loading branch information
Andreas de Pretis authored Oct 22, 2017
2 parents b7c7bf1 + 4cac75c commit 4c2d1c5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
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

0 comments on commit 4c2d1c5

Please sign in to comment.