Last active
October 17, 2022 04:34
-
-
Save tucq88/47030960fdca4745afe1e134608149a7 to your computer and use it in GitHub Desktop.
Ecom-Puller Startup Script
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
echo 'DATABASE_URI=postgresql://upatra:upatra@db:5432/ecompuller | |
SHOPIFY_VERSION=2022-07' > .env.docker | |
echo '#!/bin/bash | |
docker-compose run ecompuller pipenv run cli "$@"' > ./cli.sh | |
chmod +x ./cli.sh | |
echo 'version: "3" | |
networks: | |
upatra_network: | |
driver: bridge | |
services: | |
db: | |
image: postgres:12.12 | |
hostname: database | |
ports: | |
- 5432:5432 | |
environment: | |
- POSTGRES_USER=upatra | |
- POSTGRES_PASSWORD=upatra | |
- POSTGRES_DB=ecompuller | |
- POSTGRES_HOST=database | |
- POSTGRES_PORT=5432 | |
volumes: | |
- ./data:/var/lib/postgresql/data | |
networks: | |
- upatra_network | |
ecompuller: | |
image: upatra/ecom_puller:1.0.0 | |
depends_on: | |
- db | |
networks: | |
- upatra_network | |
env_file: | |
- .env.docker | |
command: bash -c "while !</dev/tcp/db/5432; do sleep 1; done; pipenv run alembic upgrade head" | |
' > docker-compose.yml |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment