Skip to content

Commit

Permalink
Merge pull request #793 from kmehant/docker-compose-up
Browse files Browse the repository at this point in the history
Getting Bassa ready for container based deployment using docker-compose
  • Loading branch information
JaDogg authored Aug 13, 2019
2 parents b758966 + 727ae64 commit 5933843
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jspm_packages/

*.log
components/core/debug-server.log
downloads/


# UI
ui/dist
Expand Down
2 changes: 1 addition & 1 deletion components/core/dl.conf
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"max_downloads": 2, "down_folder": "download/file/path", "size_limit":100000, "max_age":1, "min_rating":3, "max_bandwidth": 300000, "aria_server": "ws://localhost:6800/jsonrpc", "tmp_folder": "/path/to/tmp/folder"}
{"max_downloads": 2, "down_folder": "../../downloads", "size_limit":100000, "max_age":1, "min_rating":3, "max_bandwidth": 300000, "aria_server": "ws://aria2c:6800/jsonrpc", "tmp_folder": "/tmp/bassa/"}
54 changes: 44 additions & 10 deletions docker-compose.dev.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,65 @@
version: "3"
services:
bassa-api:
api:
build: components/core/
container_name: api
ports:
- 5000:5000
links:
- db
volumes:
- ./downloads:/downloads
environment:
BASSA_DB_NAME: Bassa
BASSA_DB_USERNAME: bassa
BASSA_DB_PASSWORD: bassa@1234
labels:
com.example.description: "Docker container for Bassa UI"
com.example.description: "Docker container for Bassa API server"

web:
build: ui/
build:
context: ui/
dockerfile: Dockerfile.dev
container_name: web
ports:
- 3000:3000
links:
- api
depends_on:
- db
labels:
com.example.description: "Docker container for Bassa backend"
com.example.description: "Docker container for Bassa Client"

aria2c:
build: components/aria2c/
container_name: aria2c
links:
- api
ports:
- 6800:6800
volumes:
- ./downloads:/data
restart: always
labels:
com.example.description: "Docker container for Aria2c RPC server"

db:
image: mysql
image: mysql:5.7
restart: always
volumes:
- data-volume:/var/lib/mysql
- data-volume:/var/lib/mysql
- ./.docker/volumes/mysql:/docker-entrypoint-initdb.d
- ./db_schema/:/tmp/schema/
ports:
- 3306:3306
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
MYSQL_DATABASE: ${BASSA_DB_NAME}
MYSQL_USER: ${BASSA_DB_USERNAME}
MYSQL_PASSWORD: ${BASSA_DB_PASSWORD}
MYSQL_ROOT_PASSWORD: bassa@1234
MYSQL_DATABASE: Bassa
MYSQL_USER: bassa
MYSQL_PASSWORD: bassa@1234
BASSA_DB_NAME: Bassa
labels:
com.example.description: "Docker container for Bassa Database"

volumes:
data-volume:
2 changes: 2 additions & 0 deletions downloads/data.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
This folder contains downloaded data from Aria2c
which is mapped to both Bassa API container and Aria2c RPC server

0 comments on commit 5933843

Please sign in to comment.