Skip to content

Commit

Permalink
test: add docker-compose file to set up test stand
Browse files Browse the repository at this point in the history
Now it is possible to start a local test stand with RWS and S3 storage
via `docker-compose`. It helps test RWS locally without installing any
packages.
  • Loading branch information
foxzi authored and ylobankov committed Jul 26, 2023
1 parent 161e556 commit c69f515
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

- Added support of static repositories.
- Added `Dockerfile` to build Docker images.
- Added `docker-compose.yml` for setting up a test stand.

## [1.0.7] - 2023-04-06

Expand Down
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ supported. S3 is used as storage.
* [Configuration](#configuration)
* [Caution](#caution)
* [Docker](#docker)
* [Test stand](#test-stand)

## Getting started

Expand Down Expand Up @@ -204,3 +205,15 @@ docker run \
-p 5000:5000 \
rws
```

## Test stand

For setting up a test stand, `docker-compose` can be used:

```bash
docker-compose -f test/docker-compose.yml up
```

It will run RWS and MinIO (S3 storage) in the separate Docker containers.
RWS and MinIO will listen to `:5000` and `:9000` ports respectively.
Default credentials for connecting to RWS are `rws:rws`.
34 changes: 34 additions & 0 deletions test/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
version: '3'
services:
minio:
image: bitnami/minio:latest
environment:
MINIO_ROOT_USER: admin
MINIO_ROOT_PASSWORD: superpassword
ports:
- 127.0.0.1:9000:9000
- 127.0.0.1:9090:9090
command: sh -c "mkdir -p /data/rws; minio server /data --console-address :9090"
volumes:
- 'minio_data:/data'

rws:
image: rws
environment:
- RWS_CFG=/app/config.default
- S3_REGION=rm-msk1
# User rws and password rws.
- 'RWS_CREDENTIALS={"rws": "pbkdf2:sha256:600000$$qBykxVCilTvUzGxO$$6d2e084029badef5f46e1ddbfb4e5c44aa4dbbba350bc263d212b062178ccbaa"}'
- S3_ACCESS_KEY=admin
- S3_SECRET_KEY=superpassword
- S3_URL=http://minio:9000
- S3_BUCKET=rws
working_dir: /app
ports:
- 127.0.0.1:5000:5000
build: ../
entrypoint: ["flask", "run", "--host", "0.0.0.0"]

volumes:
minio_data:
driver: local

0 comments on commit c69f515

Please sign in to comment.