Skip to content
This repository was archived by the owner on Nov 8, 2018. It is now read-only.
Open
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
20 changes: 8 additions & 12 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,20 @@ ENV SYLIUS_VERSION 1.1.1
ENV BASE_DIR /var/www
ENV SYLIUS_DIR ${BASE_DIR}/sylius

RUN curl -sL https://deb.nodesource.com/setup_7.x | bash -

RUN apt-get update -y && apt-get upgrade -y && apt-get install -y \
nodejs

# Install NodeJs dependencies
RUN npm install -g yarn gulp

#Modify UID of www-data into UID of local user
RUN usermod -u ${AS_UID} www-data

# Operate as www-data in SYLIUS_DIR per default
WORKDIR ${BASE_DIR}

# Create Sylius project
USER www-data
RUN composer create-project \
sylius/sylius-standard \
${SYLIUS_DIR} \
${SYLIUS_VERSION} \
&& chmod +x sylius/bin/console \
# Patch Sylius Standard from master (required for version < 1.1) \
&& cd sylius \
&& rm -f app/config/parameters.yml \
&& curl -o app/config/parameters.yml.dist https://raw.githubusercontent.com/Sylius/Sylius-Standard/master/app/config/parameters.yml.dist \
&& composer run-script post-install-cmd
USER root

# entrypoint.d scripts
Expand Down
8 changes: 8 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,14 @@ shell:: ##@Development Bring up a shell
${NAME}-app \
bash

.PHONY: create-project
create-project::
docker exec \
-it \
-u www-data \
${NAME}-app \
composer create-project sylius/sylius-standard sylius 1.1.1 && chmod +x sylius/bin/console

.PHONY: console
console:: ##@Development Call Symfony "console" with "console [<CMD>]"
docker exec \
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ Because ``docker-compose.yml`` uses Compose file format 2.1 at least **Docker ve
git clone https://github.com/sylius/docker sylius-docker
make help
make up
make create-project
make shell
- cd sylius
- yarn install
- yarn run gulp
- gulp
make console CMD=sylius:install
```

Expand Down
10 changes: 10 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ services:
context: .
args:
- AS_UID=${AS_UID:-33}
volumes:
- ./sylius:/var/www/sylius
environment:
- SYLIUS_DATABASE_HOST=mysql
- SYLIUS_DATABASE_USER=sylius
Expand All @@ -32,3 +34,11 @@ services:
image: mailhog/mailhog:latest
ports:
- 8025:8025
node:
container_name: ${NAME}-node
build:
context: docker/node
user: node
volumes:
- ./sylius:/srv/sylius
working_dir: /srv/sylius
3 changes: 3 additions & 0 deletions docker/node/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
FROM node:7.10.1

RUN npm install -g yarn gulp
2 changes: 0 additions & 2 deletions sylius/.gitignore

This file was deleted.