mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-02 01:03:28 +02:00
Define platform in docker-compose file and update readme (#3808)
Define platform in docker-compose file and remove eliminated step from readme
This commit is contained in:
parent
23f6b0658e
commit
c3a70f2846
2 changed files with 5 additions and 7 deletions
|
@ -21,16 +21,10 @@ Visit the running application at [http://localhost:8080](http://localhost:8080).
|
||||||
|
|
||||||
### Troubleshooting
|
### Troubleshooting
|
||||||
|
|
||||||
|
#### Line endings and manage.py
|
||||||
* If you are using Windows, you may need to change your [line endings](https://docs.github.com/en/get-started/getting-started-with-git/configuring-git-to-handle-line-endings). If not, you may not be able to run manage.py.
|
* If you are using Windows, you may need to change your [line endings](https://docs.github.com/en/get-started/getting-started-with-git/configuring-git-to-handle-line-endings). If not, you may not be able to run manage.py.
|
||||||
* Unix based operating systems (like macOS or Linux) handle line separators [differently than Windows does](https://superuser.com/questions/374028/how-are-n-and-r-handled-differently-on-linux-and-windows). This can break bash scripts in particular. In the case of manage.py, it uses *#!/usr/bin/env python* to access the Python executable. Since the script is still thinking in terms of unix line seperators, it may look for the executable *python\r* rather than *python* (since Windows cannot read the carriage return on its own) - thus leading to the error `usr/bin/env: 'python\r' no such file or directory`
|
* Unix based operating systems (like macOS or Linux) handle line separators [differently than Windows does](https://superuser.com/questions/374028/how-are-n-and-r-handled-differently-on-linux-and-windows). This can break bash scripts in particular. In the case of manage.py, it uses *#!/usr/bin/env python* to access the Python executable. Since the script is still thinking in terms of unix line seperators, it may look for the executable *python\r* rather than *python* (since Windows cannot read the carriage return on its own) - thus leading to the error `usr/bin/env: 'python\r' no such file or directory`
|
||||||
* If you'd rather not change this globally, add a `.gitattributes` file in the project root with `* text eol=lf` as the text content, and [refresh the repo](https://docs.github.com/en/get-started/getting-started-with-git/configuring-git-to-handle-line-endings#refreshing-a-repository-after-changing-line-endings)
|
* If you'd rather not change this globally, add a `.gitattributes` file in the project root with `* text eol=lf` as the text content, and [refresh the repo](https://docs.github.com/en/get-started/getting-started-with-git/configuring-git-to-handle-line-endings#refreshing-a-repository-after-changing-line-endings)
|
||||||
* If you are using a Mac with a M1 chip, and see this error `The chromium binary is not available for arm64.` or an error involving `puppeteer`, try adding this line below into your `.bashrc` or `.zshrc`.
|
|
||||||
|
|
||||||
```
|
|
||||||
export DOCKER_DEFAULT_PLATFORM=linux/amd64
|
|
||||||
```
|
|
||||||
|
|
||||||
When completed, don't forget to rerun `docker-compose up`!
|
|
||||||
|
|
||||||
## Branch Conventions
|
## Branch Conventions
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
services:
|
services:
|
||||||
app:
|
app:
|
||||||
|
platform: linux/amd64
|
||||||
build: .
|
build: .
|
||||||
depends_on:
|
depends_on:
|
||||||
- db
|
- db
|
||||||
|
@ -74,6 +75,7 @@ services:
|
||||||
python manage.py runserver 0.0.0.0:8080"
|
python manage.py runserver 0.0.0.0:8080"
|
||||||
|
|
||||||
db:
|
db:
|
||||||
|
platform: linux/amd64
|
||||||
image: postgres:latest
|
image: postgres:latest
|
||||||
environment:
|
environment:
|
||||||
- POSTGRES_DB=app
|
- POSTGRES_DB=app
|
||||||
|
@ -83,6 +85,7 @@ services:
|
||||||
- "5432:5432"
|
- "5432:5432"
|
||||||
|
|
||||||
node:
|
node:
|
||||||
|
platform: linux/amd64
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
dockerfile: node.Dockerfile
|
dockerfile: node.Dockerfile
|
||||||
|
@ -96,6 +99,7 @@ services:
|
||||||
command: ./run_node_watch.sh
|
command: ./run_node_watch.sh
|
||||||
|
|
||||||
pa11y:
|
pa11y:
|
||||||
|
platform: linux/amd64
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
dockerfile: node.Dockerfile
|
dockerfile: node.Dockerfile
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue