Skip to content

Commit 8999997

Browse files
committed
Add docker compose to generate the python script to generate PrestaShop docker
1 parent fd13531 commit 8999997

File tree

5 files changed

+41
-2
lines changed

5 files changed

+41
-2
lines changed

.docker/generate-docker.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/bin/sh
2+
3+
BASEDIR=$(dirname "$0")
4+
5+
$BASEDIR/install-environment.sh
6+
7+
echo Generate PrestaShop docker base files
8+
cd $BASEDIR/..
9+
python3 prestashop_docker.py generate

.docker/install-environment.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/bin/bash
2+
3+
BASEDIR=$(dirname "$0")
4+
5+
echo Install python and pip
6+
apt update
7+
apt-get install -y python3-pip
8+
9+
cd $BASEDIR/..
10+
requirements=`cat requirements.txt`
11+
for requirement in $requirements; do
12+
echo Install $requirement
13+
pip3 install $requirement --break-system-packages
14+
done

HOW-TO-USE.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ It requires Python 3.6+.
66
## Installation
77

88
```bash
9-
$ pip install -r requirements.txt
9+
$ pip install -r requirements.txt --break-system-packages
1010
```
1111

1212
## Usage
@@ -60,3 +60,13 @@ positional arguments:
6060
optional arguments:
6161
-h, --help show this help message and exit
6262
```
63+
64+
## Using docker compose
65+
66+
To generate the new base files, you need to update the `versions.py` file, add a section ith your new version along with the associated PHP versions, then run
67+
68+
```php
69+
docker compose up generate
70+
```
71+
72+
This will create new folders for the new version you just added.

docker-compose.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
services:
2+
generate:
3+
image: ubuntu:latest
4+
volumes:
5+
- .:/prestashop-docker
6+
command: ["/prestashop-docker/.docker/generate-docker.sh"]

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,4 @@ six==1.16.0
2424
url-normalize==1.4.3
2525
urllib3==1.26.12
2626
websocket-client==1.3.1
27-
wheel==0.38.4
27+
wheel==0.42.0

0 commit comments

Comments
 (0)