ScandiPWA (deprecated)
User ManualGitHubSlack
  • ScandiPWA (deprecated)
  • React & PWA for dummies
    • Setting Up Environment and Talking Theory
    • Learning React Hands-on
    • Styling It
    • Learning ScandiPWA Way
  • START & UPGRADE
    • Linux Docker setup
    • Mac Docker setup
    • Setting up the theme with remote M2 server
    • Theme Upgrade to the latest version
    • Automated setup (BETA)
  • A TO Z OVERVIEW
    • Motivation
    • Challenges
    • File structure and UI components
    • Rewriting and Extending A Theme
  • DESCRIPTION OF CONTAINERS
    • Ngrok
  • FAQ
    • Development
    • Installation
    • Billing and license
    • Product support
    • What is PWA?
  • HOW-TO TUTORIALS - INTRODUCTORY
    • Base template
    • Connecting to the GraphQL resolver
    • Extension mechanism
    • Creating GraphQL resolver
    • Debugging and Inspecting
    • Setting Up Frontend
    • File Structure
    • Data Flow
    • Technology Stack
    • Changing environment
    • Theme Build and Configuration
    • Implementing Caching for New Caching Identities
    • Implementing a parent theme
  • HOW-TO TUTORIALS - INTERMEDIATE
    • Debugging in Chrome
    • Configuring XDebug
    • CLI in Docker
    • Postman & GraphQL Playground
    • VSCode Extensions
    • Plugins: implementing
    • Plugins: using and publishing
    • ESlint & StyleLint
    • How To Contribute
    • Migrating to a Newer Version
    • Installation on Existing Magento 2 Sever
    • BEM and Coding Standards
    • Tools of ScandiPWA
    • React Best Practices
  • FAQ
    • Untitled
Powered by GitBook
On this page
  • ARG
  • ENV
  • Reference
  1. HOW-TO TUTORIALS - INTRODUCTORY

Changing environment

All service versions are stored and taken from variables, independently configurable for each environment. For global changes in services (enable, disable, add), you should edit docker-compose.yml.

For specific environment edits, like port mapping, file sharing etc, you should not edit docker-compose.yml, and work on environment specific overwrites, eg: docker-compose.local.yml.

Two types of variable configuration is used:

ARG

These parameters are set and used for building application container, changed in the .env file, the default values set in Dockerfile and persisted via ENV with the same name.

When you change any ARG parameter, you need to rebuild container, test it, and push changes to the repo.

ENV

This set of parameters are used in application and service runtime, couple of them are set in .env, and the rest in the .application.

The .application contains:

  • Magento admin credentials

  • Magento configurations, i.e: base url, mode

  • MySQL credentials

The .env contains:

  • Open ports

  • Service versions

  • Project tag

When those settings are changed, you need to recreate the needed container.

Reference

PreviousTechnology StackNextTheme Build and Configuration

Last updated 4 years ago

- complete guide and description about ARG/ENV usage in docker/docker-compose

- full docker-compose.yml reference

- docker-compose .env usage

https://vsupalov.com/docker-arg-env-variable-guide/
https://docs.docker.com/compose/compose-file/
https://docs.docker.com/compose/env-file/