Skip to content
This repository has been archived by the owner on Aug 22, 2024. It is now read-only.
/ statamic-starter Public archive

Statamic Starter is a Docker development environment to make Statamic development even more fun and easy.

License

Notifications You must be signed in to change notification settings

o1y/statamic-starter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Statamic Development Environment

Statamic Starter is a Docker development environment to make Statamic V3 development even more fun and easy.

Build Status License: MIT

Requirements

  • Docker Desktop >= 3.4

How do I create a new Docker Statamic development environment?

  1. To create a new Statamic development environment, put the following configuration to your docker-compose.yml:
services:
  statamic:
    image: ghcr.io/o1y/statamic-starter:latest-php8.1
    ports:
      - 8080:8080
    volumes:
      - ./:/var/www/
  1. Start the container:
docker compose up

After starting the container for the very first time the startup script checks if a Statamic project is available. If not, it will install a fresh copy.

  1. Wait until you see Statamic is ready and open a browser of your choice and access your Statamic development environment:
http://localhost:8080

How do I run please or artisan?

To run please get a bash shell in the container first:

docker compose exec statamic bash

Now you can run php artisan or php please.

An alternative way to run please or artisan commands in your container is:

docker compose exec statamic php please
docker compose exec statamic php artisan

How do I create a new Statamic User?

The easiest way to create your first user is by running

docker compose exec statamic php please make:user

Where should I put my .env variables for local development?

You should put your environment variables for local development into your .env file. Whenever you change that file, the php server will perform a reload.

However, you should not commit your local .env into your project. Instead use the file .env.docker, which we create during the initial Statamic installation.

How do I update Statamic?

In your composer.json, change the statamic/cms version to the version number of your choice, e.g:

"statamic/cms": "3.2.*"

Then run:

docker compose exec statamic composer update statamic/cms --with-dependencies

Can I use your Statamic Image in production?

The image is not ready for production use yet. Feel free to create a PR :)

License

© MIT Oliver Mesieh

About

Statamic Starter is a Docker development environment to make Statamic development even more fun and easy.

Topics

Resources

License

Stars

Watchers

Forks

Packages