forked from TonyMckes/conduit-realworld-example-app
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update code from main project (TonyMckes#9)
* Add testid to signup error message * Test docker compose (#1) * Change docker compose to pull app image * Remove unnecessary code on workflow * Minor changes * Remove users seeder * Add script to push app image to Docker Hub * Minor changes * Minor changes
- Loading branch information
1 parent
ef8bd17
commit f5a126c
Showing
4 changed files
with
26 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,4 @@ | |
node_modules/ | ||
frontend/node_modules/ | ||
backend/.env | ||
push-image-dh.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/bin/bash | ||
|
||
# Get env variables to login in Docker Hub | ||
DOCKER_HUB_USERNAME=$DOCKER_HUB_USERNAME | ||
DOCKER_HUB_PASSWORD=$DOCKER_HUB_PASSWORD | ||
|
||
# Check if the environment variables are set | ||
if [ -z "$DOCKER_HUB_USERNAME" ] || [ -z "$DOCKER_HUB_PASSWORD" ]; then | ||
echo "Error: Environment variables DOCKER_HUB_USERNAME and DOCKER_HUB_PASSWORD are not set." | ||
exit 1 | ||
fi | ||
|
||
# Compila la imagen | ||
docker build -t realworldapp-for-test-automation:latest . | ||
|
||
# Etiqueta la imagen con el nombre de usuario de Docker Hub | ||
docker tag realworldapp-for-test-automation:latest $DOCKER_HUB_USERNAME/realworldapp-for-test-automation:latest | ||
|
||
# Inicia sesión en Docker Hub | ||
docker login --username $DOCKER_HUB_USERNAME --password $DOCKER_HUB_PASSWORD | ||
|
||
# Sube la imagen a Docker Hub | ||
docker push $DOCKER_HUB_USERNAME/realworldapp-for-test-automation:latest |