LinuxmacOSWindows

Where Does Phoenix Store Config and Build Data?

Phoenix keeps env config in config/ per environment with secrets in imports, while _build artifacts and deps/ checkouts stay out of git.

Last updated

Phoenix splits code config from build outputs conventionally. The config/ folder holds per environment files plus secrets handling while _build compiles artifacts and deps/ vendors packages. Mix orchestrates all three.

Environment files layer cleanly: shared config first, environment overrides next, runtime secrets last. That ordering keeps committed files safe while deploys inject real values. New machines assemble from config plus lockfile alone.

Where Phoenix stores this, by platform

Linux
config/ + _build + deps

Per environment configs plus secrets handling versioned per project. Build and deps folders regenerate from lockfile. Ignore artifacts in git.

macOS
config/ + _build + deps

Same conventional layout on Mac installs. Runtime secrets inject at boot for releases. Clean folders fix weird builds.

Windows
config\ + _build + deps

Windows projects share the identical structure. Elixir setup varies but project files match. Lockfile pins versions.

Frequently asked questions

Where do Phoenix secrets go?

Edit config/dev.exs, test.exs, and prod.exs with secrets in runtime.exs or env vars. Never commit real secrets in config files. Releases read runtime config at boot.

How do I clean Phoenix build artifacts?

Delete _build and deps to force clean fetches when compilation misbehaves. Mix.lock pins versions for reproducibility. Fresh checkouts fetch everything from the lockfile.

Notice an outdated path? Let us know.