{"id":25519653,"url":"https://github.com/aligent/shopify-docker","last_synced_at":"2026-01-05T08:04:56.066Z","repository":{"id":256332766,"uuid":"852548184","full_name":"aligent/shopify-docker","owner":"aligent","description":null,"archived":false,"fork":false,"pushed_at":"2024-09-18T04:52:32.000Z","size":36,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":11,"default_branch":"main","last_synced_at":"2025-02-16T13:24:05.430Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aligent.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-09-05T02:02:50.000Z","updated_at":"2025-01-24T05:38:21.000Z","dependencies_parsed_at":"2024-09-18T07:36:23.206Z","dependency_job_id":null,"html_url":"https://github.com/aligent/shopify-docker","commit_stats":null,"previous_names":["aligent/aligent-shopify-theme-development-tools","aligent/aligent-shopify-theme-development-template","aligent/shopify-docker","aaronmedina-dev/shopify-docker"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aligent%2Fshopify-docker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aligent%2Fshopify-docker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aligent%2Fshopify-docker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aligent%2Fshopify-docker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aligent","download_url":"https://codeload.github.com/aligent/shopify-docker/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239703244,"owners_count":19683236,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-02-19T17:29:16.528Z","updated_at":"2025-12-22T09:30:16.516Z","avatar_url":"https://github.com/aligent.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Aligent Shopify Theme Development Template\n\n## Description\n\nDocker image for running the shopify-cli command without requiring it to be installed locally. It includes setup script, few custom shopify commands that simplifies working with Shopify themes via the shopify_wrapper, and yml file for integrating with Bitbucket Pipelines. \n\n## Limitations\n\nCurrently, this setup only supports Bitbucket Pipelines. If the client's repository is hosted on platforms like GitHub, GitLab, or others, the deployment pipeline functionality will not be available and would need to be configured separately.\n\n## File Structure\n```bash\n.\n├── assets\n│   ├── entrypoint.sh\n│   └── shopify_wrapper.sh\n├── bitbucket-pipelines.yml\n├── docker-compose.yml\n├── Dockerfile\n├── README.md\n└── set-up.sh\n```\n\n## File Descriptions\n\n- assets/\n\n    - **entrypoint.sh**: This script is the entrypoint for the Docker container. It initializes the environment, sets the correct permissions, and pulls the Shopify theme using the specified credentials and configurations. It also handles logging and error management during startup.\n    - **shopify_wrapper.sh**: A wrapper script for the Shopify CLI that overrides certain commands to enforce specific behavior, such as preventing accidental theme pushes and appending required parameters to shopify dev up commands.\n- **bitbucket-pipeline.yml**: Template bitbucket yml\n- **docker-compose.yml**: Defines the Docker Compose configuration for the project, specifying services, environment variables, volumes, and other settings needed to run the Shopify CLI within a containerized environment. It facilitates easy orchestration and management of the container setup.\n\n- **Dockerfile**: Contains instructions to build the Docker image for the project. It sets up the environment by installing necessary dependencies, copying scripts, configuring permissions, and setting the appropriate user context for running Shopify CLI commands.\n\n- **README.md**: Provides an overview of the project, including setup instructions, usage guidelines, and other relevant documentation to help users understand and work with the project effectively.\n\n- **set-up.sh**: A setup script that initializes environment variables, prompts the user for required configuration values (like Shopify store URL, theme ID, and access token), and sets up the local environment for running Docker Compose commands. It ensures that the necessary variables are exported and available for the Docker environment and adding local development files to .gitignore.\n\n\n\n## Instructions\n\n### Step 1: Download this repo.\n\n```bash\ngit clone git@github.com:aligent/shopify-docker.git\n```\n\nAnd then ```cd shopify-docker```.\n\n### Step 2: Add aliases to you bash profile\n\nAdd the following line to your ```~/.bashrc``` (or .bash_profile, .bash_aliases, etc) file to be able to run things easily\n\n```bash\ncat \u003c\u003c 'EOF' \u003e\u003e ~/.bashrc\nshopify() {\n    if [[ $1 == 'env' \u0026\u0026 $2 == 'init' ]]; then\n        docker-compose build --no-cache \u0026\u0026 docker-compose up -d \n    elif [[ $1 == 'env' \u0026\u0026 $2 == 'start' ]]; then\n        docker-compose start\n    elif [[ $1 == 'env' \u0026\u0026 $2 == 'stop' ]]; then\n        docker-compose stop\n    else\n        docker exec -it shopify-cli-container shopify \"$@\"\n    fi\n}\nEOF\n```\n\nEnsure that you ```source``` your profile to execute the script so that environment variables are set correctly in your current shell session.\n\n```bash\nsource ~/.bashrc\n```\n\n### Step 3: Set Up the Development Environment Variables.\n\nRun the command and follow the prompt to initialize the development environment:\n\n```bash\nsource set-up.sh\n```\nThis will set the environment variables and create the ```theme``` folder\n\n### Step 4: Initialise Development Environment\n\n```bash\nshopify env init\n```\n\n### Step 5: Check if Shopify is running\n\nRun the shopify version command:\n\n```bash\nshopify --version\n```\n\nYou now have a running shopify local development environment .\n\n## Additional Notes\n\n### Custom Shopify commands\n\nOur custom Shopify wrapper provides simplified and automated versions of commonly used Shopify CLI commands to streamline your workflow:\n\n- ```shopify theme pull``` When run without any arguments, this command automatically uses the SHOPIFY_STORE, SHOPIFY_ACCESS_TOKEN, and THEME_ID in the environment variables specified during the setup process, saving you time and ensuring consistency. If you need to provide specific arguments, the original Shopify theme pull functionality is still available by including them explicitly in the command.\n\n- ```shopify theme dev up``` This is a shorthand command for running shopify theme dev with predefined arguments: ```--password=$SHOPIFY_ACCESS_TOKEN```, ```--store=$SHOPIFY_STORE```, and ```--nodelete```. It simplifies starting the development server by automatically feeding in the required authentication and store details.\n\n- ```shopify theme list``` Lists all available themes and their details for your Shopify store. This command helps you quickly view and manage your themes without needing additional parameters.\n\n- ```shopify theme push``` This command is **DISABLED** in the development environment to prevent themes from being pushed directly, ensuring that all deployments go through the designated deployment pipeline for better version control and consistency.\n\n- ```shopify show store-config``` Displays the current environment variables related to your Shopify store configuration. This command outputs the values for SHOPIFY_STORE, THEME_ID, and SHOPIFY_ACCESS_TOKEN, allowing you to quickly review the current setup without opening configuration files manually.\n\n- ```shopify edit store-config``` Allows you to update the environment variables for your Shopify store configuration directly from the CLI. When this command is run, it prompts you to enter new values for SHOPIFY_STORE, THEME_ID, and SHOPIFY_ACCESS_TOKEN. If you leave the input blank, the current value is retained. The updates are saved to the local.env file in the Docker container to ensure they persist across sessions.\n\nThese custom commands are designed to improve efficiency and enforce best practices while working with Shopify themes in your development environment.\n\n\n### Managing your Shopify local environment.\n\nYou can start/stop your Shopify environment using these commands:\n```bash\nshopify env stop\nshopify env start\n```\n\n## Configuring Shopify Theme Bitbucket Pipeline \\[for DevOps\\]\n\n### Set Repository Variables\n- SHOPIFY_STORE\n- SHOPIFY_ACCESS_TOKEN\n- FAIL_LEVEL\n```bash\n\u003coptions: crash|error|suggestion|style|warning|info\u003e\n```\n\n### Set Deployments Variable\n\nStaging\n- THEME_ID\n\n- ASCII_LABEL\n\n\"STAGING\"\n```bash\n  _____ _______       _____ _____ _   _  _____ \\n / ____|__   __|/\\   / ____|_   _| \\ | |/ ____|\\n| (___    | |  /  \\ | |  __  | | |  \\| | |  __ \\n \\___ \\   | | / /\\ \\| | |_ | | | | .   | | |_ |\\n ____) |  | |/ ____ \\ |__| |_| |_| |\\  | |__| |\\n|_____/   |_/_/    \\_\\_____|_____|_| \\_|\\_____|\\n\n  ```\n\n- THEME_PUSH_ARGS\n```--verbose --nodelete\n```\n\nProduction\n- THEME_ID\n\n- ASCII_LABEL\n\n\"PRODUCTION\"\n```bash\n _____  _____   ____  _____  _    _  _____ _______ _____ ____  _   _ \\n|  __ \\|  __ \\ / __ \\|  __ \\| |  | |/ ____|__   __|_   _/ __ \\| \\ | |\\n| |__) | |__) | |  | | |  | | |  | | |       | |    | || |  | |  \\| |\\n|  ___/|  _  /| |  | | |  | | |  | | |       | |    | || |  | | .   |\\n| |    | | \\ \\| |__| | |__| | |__| | |____   | |   _| || |__| | |\\  |\\n|_|    |_|  \\_|\\____/|_____/ \\____/ \\_____|  |_|  |_____\\____/|_| \\_|\\n\n ```\n\n- THEME_PUSH_ARGS\n```bash\n--verbose --allow-live\n```\n\n## Author\n\n**Author**: Aaron Medina (aaron.medina@aligent.com.au)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faligent%2Fshopify-docker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faligent%2Fshopify-docker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faligent%2Fshopify-docker/lists"}