diff --git a/README.md b/README.md index dcc2568e..74255919 100644 --- a/README.md +++ b/README.md @@ -38,23 +38,11 @@ To run this project in your development machine, follow these steps: `python3.6 ./manage.py runserver 0.0.0.0:8000` -8. Start the [Weasyprint server](https://hub.docker.com/r/aquavitae/weasyprint/) server on port 5005 - - 1. Bind the IP address 10.200.10.1 to the lo0 interface on your Mac computer. Weasyprint has been configured to use this IP address to request CSS files from Django. - ``` - sudo ifconfig lo0 alias 10.200.10.1/24 - ``` - - 1. Start docker - ``` - docker run -d -p 5005:5001 aquavitae/weasyprint - ``` - -9. Start up docker containers: +8. Start up docker containers: `docker-compose up -d` -10. Open your browser and go to http://127.0.0.1:8000, you will be greeted with the eDivorce homepage. In dev mode, you can log in with any username and the password 'divorce'. +9. Open your browser and go to http://127.0.0.1:8000, you will be greeted with the eDivorce homepage. In dev mode, you can log in with any username and the password 'divorce'. ### SCSS Compilation diff --git a/docker-compose.yml b/docker-compose.yml index ba56a1b1..a300546d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -34,5 +34,14 @@ services: ports: - "8082:8081" + # Weasyprint (PDF generator) + weasyprint: + container_name: edivorce-weasyprint + hostname: weasyprint + image: aquavitae/weasyprint + ports: + - "5005:5001" + restart: always + volumes: data-redis: diff --git a/edivorce/settings/local.py b/edivorce/settings/local.py index 944f806e..d413bc51 100644 --- a/edivorce/settings/local.py +++ b/edivorce/settings/local.py @@ -17,7 +17,7 @@ SESSION_COOKIE_AGE = 3600 TEMPLATES[0]["OPTIONS"]["debug"] = True WEASYPRINT_URL = 'http://localhost:5005' -WEASYPRINT_CSS_LOOPBACK = 'http://10.200.10.1:8000' +WEASYPRINT_CSS_LOOPBACK = 'http://host.docker.internal:8000' DEPLOYMENT_TYPE = 'localdev' REGISTER_URL = '#'