Building docker containers in parallel.

This commit is contained in:
Roland 2022-03-09 19:00:35 -07:00
parent 76aee2620d
commit 83d2d2a1c9
No known key found for this signature in database
GPG key ID: 9D6DBD3ACF11AB93
3 changed files with 9 additions and 11 deletions

View file

@ -28,7 +28,7 @@ network so that any person with a laptop/tablet/phone can connect and use the da
- [x] Food Inventory management
- [x] Wi-Fi Hotspot
- [x] Universal search
- [x] Map viewer & downloader
- [x] Map viewer
- [ ] eBook viewer
- [ ] Wiki viewer & downloader
- [ ] Synchronizer and/or duplicator
@ -48,16 +48,18 @@ You can try out WROLPi by running the docker containers.
* `git clone git@github.com:lrnselfreliance/wrolpi.git`
3. Change directory into the code base
* `cd wrolpi`
4. Start the database.
4. Build the containers
* `docker-compose build --parallel`
5. Start the database.
* `docker-compose up -d db`
5. Initialize the database
6. Initialize the database
* `docker-compose run --rm api db upgrade`
6. Create volumes
7. Create volumes
* `docker volume create --name=openstreetmap-data`
* `docker volume create --name=openstreetmap-rendered-tiles`
7. Start the docker containers
8. Start the docker containers
* `docker-compose up`
8. Navigate to WROLPi
9. Browse to WROLPi
* http://0.0.0.0:8080
# RaspberryPi Install

View file

@ -19,8 +19,6 @@ from wrolpi.db import postgres_engine, get_db_args
from wrolpi.downloader import DownloadManager
from wrolpi.root_api import BLUEPRINTS, api_app
os.environ['DB_PORT'] = '54321'
def get_test_db_engine():
suffix = str(uuid1()).replace('-', '')

View file

@ -26,11 +26,9 @@ def get_db_args(dbname: str = None):
# Deployed in docker, use the docker database.
db_args['user'] = 'postgres'
db_args['host'] = 'db'
db_args['port'] = 5432
elif PYTEST:
# Pytest is running but we're not in docker, use the exposed docker container port.
# Pytest is running, but we're not in docker, use the exposed docker container port.
db_args['user'] = 'postgres'
db_args['port'] = 5432
return db_args