-
Notifications
You must be signed in to change notification settings - Fork 888
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
Upgrade to Saleor 3.5.x and introduce Make commands #158
Changes from all commits
60fcd6b
f0e6ab1
0c20f72
fc6ae6a
43ac1dd
424bfc0
03929cf
42c7b8e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
.idea |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
bootstrap: | ||
docker-compose build | ||
docker-compose run --rm api python3 manage.py migrate | ||
docker-compose run --rm api python3 manage.py collectstatic --noinput | ||
docker-compose run --rm api python3 manage.py populatedb --createsuperuser | ||
run: | ||
docker-compose up | ||
run-backend: | ||
docker-compose up api worker | ||
upgrade: | ||
git submodule update --remote |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,10 +10,32 @@ All Saleor services started from a single repository | |
|
||
## How to run it? | ||
|
||
### With Makefile | ||
You can run few make commands | ||
|
||
#### Bootstrap app | ||
```shell | ||
make | ||
``` | ||
|
||
#### Run all services | ||
```shell | ||
make run | ||
``` | ||
|
||
#### Run only backend services | ||
```shell | ||
make run-backend | ||
``` | ||
|
||
See [Makefile](Makefile) for all commands | ||
|
||
### With Docker steps | ||
|
||
1. Clone the repository: | ||
|
||
``` | ||
$ git clone https://github.com/saleor/saleor-platform.git --recursive --jobs 3 | ||
git clone https://github.com/saleor/saleor-platform.git --recursive --jobs 3 | ||
``` | ||
|
||
2. We are using shared folders to enable live code reloading. Without this, Docker Compose will not start: | ||
|
@@ -22,44 +44,50 @@ $ git clone https://github.com/saleor/saleor-platform.git --recursive --jobs 3 | |
- Linux: No action required, sharing already enabled and memory for Docker engine is not limited. | ||
|
||
3. Go to the cloned directory: | ||
``` | ||
$ cd saleor-platform | ||
```shell | ||
cd saleor-platform | ||
``` | ||
|
||
4. Build the application: | ||
``` | ||
$ docker-compose build | ||
```shell | ||
docker-compose build | ||
``` | ||
|
||
5. Apply Django migrations: | ||
``` | ||
$ docker-compose run --rm api python3 manage.py migrate | ||
```shell | ||
docker-compose run --rm api python3 manage.py migrate | ||
``` | ||
|
||
6. Collect static files: | ||
``` | ||
$ docker-compose run --rm api python3 manage.py collectstatic --noinput | ||
```shell | ||
docker-compose run --rm api python3 manage.py collectstatic --noinput | ||
``` | ||
|
||
7. Populate the database with example data and create the admin user: | ||
``` | ||
$ docker-compose run --rm api python3 manage.py populatedb --createsuperuser | ||
```shell | ||
docker-compose run --rm api python3 manage.py populatedb --createsuperuser | ||
``` | ||
*Note that `--createsuperuser` argument creates an admin account for `admin@example.com` with the password set to `admin`.* | ||
|
||
8. Run the application: | ||
``` | ||
$ docker-compose up | ||
```shell | ||
docker-compose up | ||
``` | ||
*Both storefront and dashboard are quite big frontend projects and it might take up to few minutes for them to compile depending on your CPU. If nothing shows up on port 3001 or 9000 wait until `Compiled successfully` shows in the console output.* | ||
|
||
## Where is the application running? | ||
- Saleor Core (API) - http://localhost:8000 | ||
- Saleor React Storefront - http://localhost:3001 | ||
- Saleor Dashboard - http://localhost:9000 | ||
- Jaeger UI (APM) - http://localhost:16686 | ||
- Mailhog (Test email interface) - http://localhost:8025 | ||
|
||
## How to update the subprojects to the newest versions? | ||
This repository contains newest stable versions. | ||
When new release appear, pull new version of this repository. | ||
In order to update all of them to their newest versions, run: | ||
``` | ||
$ git submodule update --remote | ||
```shell | ||
git submodule update --remote | ||
``` | ||
|
||
You can find the latest version of Saleor, storefront and dashboard in their individual repositories: | ||
|
@@ -74,19 +102,19 @@ Most of the time both issues can be solved by cleaning up space taken by old con | |
|
||
|
||
1. Make sure docker stack is not running | ||
``` | ||
$ docker-compose stop | ||
```shell | ||
docker-compose stop | ||
``` | ||
|
||
2. Remove existing volumes | ||
|
||
**Warning!** Proceeding will remove also your database container! If you need existing data, please remove only services which cause problems! https://docs.docker.com/compose/reference/rm/ | ||
``` | ||
```shell | ||
docker-compose rm | ||
``` | ||
|
||
3. Build fresh containers | ||
``` | ||
```shell | ||
docker-compose build | ||
``` | ||
|
||
|
@@ -107,8 +135,8 @@ If you are getting issues with lack of available space, consider prunning your d | |
<details><summary>I've been warned</summary> | ||
<p> | ||
|
||
``` | ||
$ docker system prune | ||
```shell | ||
docker system prune | ||
``` | ||
|
||
</p> | ||
|
@@ -125,7 +153,7 @@ When testing developer releases or making local changes, you might end up in a s | |
<details><summary>I've been warned</summary> | ||
<p> | ||
|
||
``` | ||
```shell | ||
docker-compose down --volumes db | ||
``` | ||
|
||
|
@@ -136,20 +164,11 @@ docker-compose down --volumes db | |
- `docker-compose up api worker` for backend services only | ||
- `docker-compose up` for backend and frontend services | ||
|
||
|
||
## Where is the application running? | ||
- Saleor Core (API) - http://localhost:8000 | ||
- Saleor React Storefront - http://localhost:3001 | ||
- Saleor Dashboard - http://localhost:9000 | ||
- Jaeger UI (APM) - http://localhost:16686 | ||
- Mailhog (Test email interface) - http://localhost:8025 | ||
|
||
## Feedback | ||
|
||
If you have any questions or feedback, do not hesitate to contact us via GitHub or Gitter: | ||
|
||
- https://github.com/saleor/saleor/discussions | ||
- https://gitter.im/mirumee/saleor | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why do we remove that? I thought it's still supported, I saw @karolkielecki comments there no more than month old. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For better SEO/searchability, we are moving to Github discussions |
||
|
||
|
||
## License | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wonder if adding "cleanup" command would be a good idea? It would tear down the db and its volume.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As discussed, @krzysztofwolski will open separate issue for it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#159 task added 👍