Giter Site home page Giter Site logo

wintercms's Introduction

Winter CMS Docker

Docker image for Winter CMS

Docker

About this Repo

This is an automated build based on the official PHP image, and supports similar tags.

Quickstart

If you'd like to get up and running quickly, this image can be run without any linked containers.

$ docker run --name some-winter -p 8080:80 -d dragontek/wintercms

This will start the container and initialize a local SQLite instance for the database. You can visit the site by going to http://localhost:8080. The default username for the backend is 'admin', and the initial password is randomly generated and can be found in the logs.

$ docker logs some-winter

...
The following password has been automatically generated for the "admin" account: ***************
...

Winter provides a great interface for modifying files directly through the backend, and for many takss, such as theme and plugin development, this may be sufficient. The image also exposes the /var/www/html folder so if you'd like to use a local editor, you can mount that to your local machine:

$ docker run --name some-winter -p 8080:80 -v $(pwd):/var/www/html -d dragontek/wintercms

This will start the container and copy the full website to the current directory. This is a better option for tasks such as plugin development as you can use local tools such as git.

Database Support

The examples so far have used a local SQLite instance, but for production you will probably want to use either MySQL/MariaDB or Postgres. These can be configured through environment variables.

$ docker run --name some-mysql -e MYSQL_ROOT_PASSWORD=superstrongpassword -e MYSQL_DATABASE=winter -e MYSQL_USER=winter -e MYSQL_PASSWORD -d mysql:5.7
$ docker run --name some-winter -p 8080:80 -e DB_CONNECTION=mysql -e DB_HOST=some-mysql DB_DATABASE=winter DB_USERNAME=winter DB_PASSWORD=winter -d dragontek/octobercms

A better solution is to use docker-compose:

# docker-compose.yml
version: "3.9"
    
services:
  db:
    image: mysql:5.7
    volumes:
      - db_data:/var/lib/mysql
    restart: always
    environment:
      MYSQL_ROOT_PASSWORD: superstrongpassword
      MYSQL_DATABASE: winter
      MYSQL_USER: winter
      MYSQL_PASSWORD: winter
    
  winter:
    depends_on:
      - db
    image: dragontek/wintercms:latest
    volumes:
      - winter_data:/var/www/html
    ports:
      - "8080:80"
    restart: always
    environment:
      APP_DEBUG: 'false'
      DB_CONNECTION: mysql
      DB_HOST: db
      DB_DATABASE: winter
      DB_USERNAME: winter
      DB_PASSWORD: winter
volumes:
  db_data: {}
  winter_data: {}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.