Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce Flashlight to devdocs #1761

Merged
merged 3 commits into from
Dec 19, 2023
Merged
Show file tree
Hide file tree
Changes from 2 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
81 changes: 81 additions & 0 deletions basics/installation/advanced/prestashop-flashlight.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
---
title: Installing PrestaShop with Docker + PrestaShop Flashlight
menuTitle: Docker (Flashlight)
weight: 3
useMermaid: true
---

# Installing PrestaShop with Docker + PrestaShop Flashlight

PrestaShop Flashlight was made to be able to start a PrestaShop instance within seconds.

It comes with default / demo content, Back Office access, and tools in the containers and in the Docker Compose manifest to run:

- `PhpMyAdmin` (administration of MySQL over a web interface)
- `Composer` (dependency manager for PHP)
- `php-cs-fixer` (tool to apply code standards to your code)
- `phpstan` (PHP STatic ANalysis tool)
- `phpunit` (a PHP Testing Framework)

<div class='mermaid'>
timeline
Setup environment
: Install Docker
: Clone Flashlight repository
Install PrestaShop
: Start Docker Compose stack
Use / develop on PrestaShop
: You are ready to go
</div>

{{% notice warning %}}
This installation method is not for production and should not be exposed to public traffic over the internet,
please use it locally only, or at your own risks.

Are you looking for production-grade images?
{{<cta relref="/8/basics/installation/environments/docker" type="primary">}}
Install PrestaShop with Docker
{{</cta>}}

{{% /notice %}}

## Install prerequisites

Follow this guide: [Install PrestaShop with Docker]({{<relref "/8/basics/installation/environments/docker">}}) at steps:

- Install Docker
- Install Docker Compose

## Run PrestaShop with Docker + PrestaShop Flashlight

1. [Clone the git repository: https://github.com/PrestaShop/prestashop-flashlight](https://github.com/PrestaShop/prestashop-flashlight)

```bash
git clone [email protected]:PrestaShop/prestashop-flashlight.git
```

2. Setup the env file

```bash
cp .env.dist .env
thomasnares marked this conversation as resolved.
Show resolved Hide resolved
# edit your .env file with your settings if required
```

3. Start the stack

```bash
docker compose up
```

Wait a few seconds, and your instance is ready to be tested / accessed at `http://localhost:8000`.

| Access / credentials Memo | |
| --- | --- |
| Front office default URL | http://localhost:8000 |
| Back office default URL | http://localhost:8000/admin-dev |
| Back office default email | [email protected] |
| Back office default password | prestashop |

## Examples and environment variables reference

A complete list of environment variables available for tuning the instance, and a few examples are available in the Github repository: https://github.com/PrestaShop/prestashop-flashlight
13 changes: 12 additions & 1 deletion basics/installation/environments/docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,13 @@ timeline
: You are ready to go
</div>

{{% notice note %}}
Looking for a quicker way to test and develop on PrestaShop?

{{<cta relref="/8/basics/installation/advanced/prestashop-flashlight" type="primary">}}
Install PrestaShop locally with Docker and PrestaShop Flashlight
{{</cta>}}
{{% /notice %}}
## Install Docker

Docker is available on each major operating system. [You will need to install Docker](https://docs.docker.com/get-docker/).
Expand All @@ -44,11 +51,15 @@ Docker Compose is a tool that simplifies the management of multi-container Docke

Docker Compose is included in versions of Docker Desktop (Windows, Mac). If you are using Docker on Linux, [you must install docker compose](https://docs.docker.com/compose/install/).


## Use Docker Compose to manage your stack

Docker Compose will help start and stop your PrestaShop stack, persist your database with a volume, persist your installation, and will allow you to mount local modules and/or themes in PrestaShop.

PrestaShop provides two options when it comes to running it with Docker:

- Production ready images with minimal tooling.
- Development and testing friendly images with tooling: PrestaShop Flashlight.

### Create the docker-compose.yml manifest

```yaml
Expand Down
Loading