Skip to content

Commit

Permalink
Update docs about ECR pre-existence and try again
Browse files Browse the repository at this point in the history
  • Loading branch information
nutjob4life committed Jan 8, 2025
1 parent 97f8743 commit 99958e5
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
17 changes: 14 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,20 @@ TBD. Secrets. Env vars. Etc.

### Elastic Container Registry

GitHub Actions is already configured to register images built to support this project with the AWS Elastic Container³ Registry (ECR). However, if you ever need to build things manually, you'll need to log in with your ECR's login password:
GitHub Actions is already configured to register images built to support this project with the AWS Elastic Container³ Registry (ECR). Please note that the registries must be hand-built before the Actions can use them. With appropriate permissions, please run:

aws configure
aws ecr get-login-password --region us-west-2 | docker login --username AWS --password-stdin ACCOUNT.dkr.ecr.us-west-2.amazonaws.com

Replace `ACCOUNT` with your AWS account ID.

Then, to build the two ECRs, run:

aws ecr create-repository --repository-name solr-portal # note the repositoryUri
aws ecr create-repository --repository-name drupal-portal # note the repositoryUri

You should take a note of the `repositoryUri` in each case if you ever want to build the images manually (see below).


### Multiplatform Images

Expand All @@ -82,17 +89,21 @@ To build the image for your current host platform and load it into your local Do

For multiple platforms, you can build and publish to the ECR in one step:

aws ecr create-repository --repository-name solr-portal # note the repositoryUri
docker buildx build --platform linux/amd64,linux/arm64 \
--tag REPOSITORY-URI:latest \
--file solr/Dockerfile --push \
.

Replace `REPOSITORY-URI` with the URI from `aws ecr create-repository`.
Replace `REPOSITORY-URI` with the URI from `aws ecr create-repository` (above).

Note: it doesn't make much sense to load a multiplatform image into your local Docker registry as your local Docker installation supports only your current host platform, but you can do so if you wish by replacing `--push` with `--load`.


### 🥀 Drupal Image

TBD.


## 👥 Contributing

Within the NASA Planetary Data System, we value the health of our community as much as the code. Towards that end, we ask that you read and practice what's described in these documents:
Expand Down
5 changes: 4 additions & 1 deletion drupal/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@

@app.route('/')
def index():
return Response('<p>Okay, this from Flask, from a Docker container allegedly 🌍</p>', mimetype='text/html')
return Response(
'<p>Okay, this from Flask, from a Docker container allegedly from ECR (allegedly) 🌍</p>',
mimetype='text/html'
)
# solr_url = 'http://solr.drupalservices.local:8983/solr/'

# try:
Expand Down

0 comments on commit 99958e5

Please sign in to comment.