Skip to content
This repository was archived by the owner on Nov 5, 2021. It is now read-only.

Update ffa6653a-7d0e-41cc-a24e-074752b2ce1e.md #274

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
53 changes: 11 additions & 42 deletions 202009.0/ffa6653a-7d0e-41cc-a24e-074752b2ce1e.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
> Audience:
> - Everyone who is not familiar with the Docker SDK.
>
> Outcome:
> - You know how to quickly set up Spryker in a local environment.
In this guide we are going to launch an existing Spryker project in Docker containers on a local developemnt machine,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clearly set epxectations.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Focus only on Dev mode. Once concern per page, please.
Production specification is more complex than a snippet on this page :)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

developemnt -> development

using Docker SDK.

This document describes how you can quickly set up a local environment with the Docker SDK.
In case you don't have a Spryker Project yet or want to start with a fresh installation,
we recommend starting with complete Installation guides:
* [Installing Spryker with Docker](https://documentation.spryker.com/docs/installing-spryker-with-docker)

## Running the Docker SDK in a local environment

To run the Docker SDK in a local environment, follow the instructions below.

### Installing Docker

Expand All @@ -17,24 +13,20 @@ For Docker installation instructions, see one of the following:
* [Installing Docker prerequisites on Linux](https://documentation.spryker.com/docs/installing-docker-prerequisites-on-linux)
* [Installing Docker prerequisites on Windows](https://documentation.spryker.com/docs/installing-docker-prerequisites-on-windows)

### Setting up a project with the Docker SDK
### Adding Docker SDK to Spryker Project

To set up a local project with the Docker SDK:

1. Create the project directory and clone the source:
```bash
mkdir {project-name} && cd {project-name}
git clone https://github.com/{project-url} ./
```
1. Using a terminal navigate to your project root folder, there you can find src/ directory and composer.json file.

2. Clone the latest version of the Docker SDK:
2. Clone the latest version of the Docker SDK into the project root folder:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sprymiker we need to place a correct docker.yaml to the root,
if I didn't have any Docker SDK before.

What template should I use?
How does the template correlate to the version of Docker?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you use demoshop boilerplate, you already have a bunch of deploy.yml files inside. If you did not use it for more than 2 years you will need an integration guide anyway.

Also one template does cover only one case, therefore we probably need multiple templates. So I assume we can just direct users to our demoshops boilerplates.


```bash
git clone [email protected]:spryker/docker-sdk.git docker
```


## Setting up a developer environemnt
## Launching a developer environemnt

To set up a developer environment:

Expand All @@ -58,31 +50,8 @@ Depending on your requirements, you can select any combination of the following
- `--assets` - build assets
- `--data` - fetch new demo data


## Setting up a production-like environment
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sprymiker please split into a separate page, if we still don't have one.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And there is nothing quick in the launching production env


To set up a production-like environment:

1. Bootstrap docker setup, build and start the instance:

```bash
docker/sdk boot deploy.*.yml
docker/sdk up
```

2. Switch to your project branch, re-build the application with assets and demo data from the new branch:

```bash
git checkout {your_branch_name}
docker/sdk boot
docker/sdk up --build --assets --data
```

Depending on your requirements, you can select any combination of the following `up` command attributes. To fetch all the changes from the branch you switch to, we recommend running the command with all of them:
- `--build` - update composer, generate transfer objects, etc.
- `--assets` - build assets
- `--data` - get new demo data

Here you go! Now every Spryker Application of your project is running in a separate Docker container and
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sprymiker could you add, how can I confirm a successful installation,
what links to use? or maybe a healthcheck run?

you can continue writing amazing code using Docker environment!
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure this is a place of stilted phrases here....


## Troubleshooting

Expand Down