Skip to content

Commit

Permalink
docker: add Dockerfile to build Docker images
Browse files Browse the repository at this point in the history
Add `Dockerfile` to build Docker images with RWS application inside.
  • Loading branch information
foxzi authored and ylobankov committed Jul 26, 2023
1 parent 37dfeb6 commit 161e556
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
### Added

- Added support of static repositories.
- Added `Dockerfile` to build Docker images.

## [1.0.7] - 2023-04-06

Expand Down
13 changes: 13 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
FROM python:3.9

WORKDIR /app

COPY . .

RUN pip install --no-cache-dir -r requirements.txt

EXPOSE 5000

ENV FLASK_APP=app.py

CMD [ "flask", "run", "--host", "0.0.0.0" ]
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ supported. S3 is used as storage.
* [Usage](#usage)
* [Configuration](#configuration)
* [Caution](#caution)
* [Docker](#docker)

## Getting started

Expand Down Expand Up @@ -185,3 +186,21 @@ Tip (hashing password for credentials):
```bash
python3 -c "from werkzeug.security import generate_password_hash; print(generate_password_hash('password'))"
```

## Docker

For running RWS via Docker, just create an image and run a container from it.

```bash
docker build -t rws .
docker run \
-e RWS_CFG=/app/config.default \
-e RWS_CREDENTIALS='{"user": "password"}' \
-e S3_ACCESS_KEY=foo \
-e S3_SECRET_KEY=bar \
-e S3_REGION=foobar \
-e S3_URL=http://127.0.0.1:9000 \
-e S3_BUCKET=barfoo \
-p 5000:5000 \
rws
```

0 comments on commit 161e556

Please sign in to comment.