All Projects → monicahq → docker

monicahq / docker

Licence: GPL-2.0 license
docker image of Monica

Programming Languages

shell
77523 projects
Dockerfile
14818 projects

Projects that are alternatives of or similar to docker

Containerregistry
A set of Python libraries and tools for interacting with a Docker Registry.
Stars: ✭ 183 (+105.62%)
Mutual labels:  docker-images
dockerfiles
A collection of Dockerfiles
Stars: ✭ 103 (+15.73%)
Mutual labels:  docker-images
docker-image-size-limit
🐳 Keep an eye on your docker image size and prevent it from growing too big
Stars: ✭ 102 (+14.61%)
Mutual labels:  docker-images
Docker Credential Gcr
A Docker credential helper for GCR users
Stars: ✭ 192 (+115.73%)
Mutual labels:  docker-images
Devdock
Build php development & production environment based on Docker
Stars: ✭ 242 (+171.91%)
Mutual labels:  docker-images
dockerfiles
Repository for my public Docker images.
Stars: ✭ 22 (-75.28%)
Mutual labels:  docker-images
Mq Container
Container images for IBM® MQ
Stars: ✭ 138 (+55.06%)
Mutual labels:  docker-images
distros.bid
A saas to create drupal websites in seconds using docker containers.
Stars: ✭ 16 (-82.02%)
Mutual labels:  docker-images
docker-credential-magic
A magic shim for Docker credential helpers 🪄
Stars: ✭ 56 (-37.08%)
Mutual labels:  docker-images
ctfhub base image
Index of CTFHub Base Images
Stars: ✭ 70 (-21.35%)
Mutual labels:  docker-images
Gcr.io
🌀 sync the docker images of the gcr.io and quay.io
Stars: ✭ 200 (+124.72%)
Mutual labels:  docker-images
Build Harness
🤖Collection of Makefiles to facilitate building Golang projects, Dockerfiles, Helm charts, and more
Stars: ✭ 236 (+165.17%)
Mutual labels:  docker-images
docker-manpages-osx
the missing man pages for Docker on Mac OS X
Stars: ✭ 16 (-82.02%)
Mutual labels:  docker-images
Earthly
Repeatable builds
Stars: ✭ 5,805 (+6422.47%)
Mutual labels:  docker-images
docker-php7
Docker image tailed to run PHP application
Stars: ✭ 18 (-79.78%)
Mutual labels:  docker-images
Nodedock
📦🚢 Docker Node.js development environment
Stars: ✭ 180 (+102.25%)
Mutual labels:  docker-images
discolix
distroless arm docker images
Stars: ✭ 22 (-75.28%)
Mutual labels:  docker-images
monica-fork
🧗 您的私人社交关系管家。Monica with Lunar Calendar support and more security features.
Stars: ✭ 11 (-87.64%)
Mutual labels:  monica
docker-files
Teracy docker-files project to build common Docker images
Stars: ✭ 87 (-2.25%)
Mutual labels:  docker-images
binance-node-docker
Docker image for Binance full and light nodes
Stars: ✭ 24 (-73.03%)
Mutual labels:  docker-images

Monica's docker image

Docker Pulls Monica's docker

amd64 build status badge arm32v5 build status badge arm32v6 build status badge arm32v7 build status badge arm64v8 build status badge i386 build status badge mips64le build status badge ppc64le build status badge s390x build status badge

MonicaHQ

Monica can run with Docker images.

Prerequisites

You can use Docker and docker-compose to pull or build and run a Monica image, complete with a self-contained MySQL database. This has the nice properties that you don't have to install lots of software directly onto your system, and you can be up and running quickly with a known working environment.

For any help about how to install Docker, see their documentation

Use Monica docker image

There are two versions of the image you may choose from.

The apache tag contains a full Monica installation with an apache webserver. This points to the default latest tag too.

The fpm tag contains a fastCGI-Process that serves the web pages. This image should be combined with a webserver used as a proxy, like apache or nginx.

Using the apache image

This image contains a webserver that exposes port 80. Run the container with:

docker run -d -p 8080:80 monica

Using the fpm image

This image serves a fastCGI server that exposes port 9000. You may need an additional web server that can proxy requests to the fpm port 9000 of the container. Run this container with:

docker run -d -p 9000:9000 monica:fpm

Persistent data storage

To have a persistent storage for your datas, you may want to create volumes for your db, and for monica you will have to save the /var/www/html/storage directory.

Run a container with this named volume:

docker run -d 
-v monica_data:/var/www/html/storage
monica

Connect to a mysql database

Monica needs a database connection, and currently supports mysql only. Run these to have a running environment:

mysqlCid="$(docker run -d \
 -e MYSQL_RANDOM_ROOT_PASSWORD=true \
 -e MYSQL_DATABASE=monica \
 -e MYSQL_USER=homestead \
 -e MYSQL_PASSWORD=secret \
 "mysql:5.7")"
docker run -d \
 --link "$mysqlCid":mysql \
 -e DB_HOST=mysql \
 -p 8080:80 \
 monica

Wait until all migrations are done and then access Monica at http://localhost:8080/ from your host system. If this looks ok, add your first user account.

Run commands inside the container

Like every Laravel application, the php artisan command is very usefull for Monica. To run a command inside the container, run

docker exec CONTAINER_ID php artisan COMMAND

or for docker-compose

docker-compose exec monica php artisan COMMAND

where monica is the name of the service in your docker-compose.yml file.

Running the image with docker-compose

See some examples of docker-compose possibilities in the example section.


Apache version

This version will use the apache image and add a mysql container. The volumes are set to keep your data persistent. This setup provides no ssl encryption and is intended to run behind a proxy.

Make sure to pass in values for APP_KEY variable before you run this setup.

Set APP_KEY to a random 32-character string. You can for instance copy and paste the output of echo -n 'base64:'; openssl rand -base64 32.

  1. Create a docker-compose.yml file
version: "3.4"

services:
  app:
    image: monica
    depends_on:
      - db
    ports:
      - 8080:80
    environment:
      - APP_KEY=
      - DB_HOST=db
      - DB_USERNAME=usermonica
      - DB_PASSWORD=secret
    volumes:
      - data:/var/www/html/storage
    restart: always

  db:
    image: mysql:5.7
    environment:
      - MYSQL_RANDOM_ROOT_PASSWORD=true
      - MYSQL_DATABASE=monica
      - MYSQL_USER=usermonica
      - MYSQL_PASSWORD=secret
    volumes:
      - mysql:/var/lib/mysql
    restart: always

volumes:
  data:
    name: data
  mysql:
    name: mysql
  1. Set a value for APP_KEY variable before you run this setup. You can for instance copy and paste the output of

    echo -n 'base64:'; openssl rand -base64 32
  2. Run

    docker-compose up -d

    Wait until all migrations are done and then access Monica at http://localhost:8080/ from your host system. If this looks ok, add your first user account.

  3. Run this command once:

    docker-compose exec app php artisan setup:production

FPM version

When using FPM image, you will need another container with a webserver to proxy http requests. In this example we use nginx with a basic container to do this.

  1. Download nginx.conf and Dockerfile file for nginx image. An example can be found on the example section
    mkdir web
    curl -sSL https://raw.githubusercontent.com/monicahq/docker/master/.examples/nginx-proxy/web/nginx.conf -o web/nginx.conf
    curl -sSL https://raw.githubusercontent.com/monicahq/docker/master/.examples/nginx-proxy/web/Dockerfile -o web/Dockerfile

The web container image should be pre-build before each deploy with: docker-compose build

  1. Create a docker-compose.yml file
version: "3.4"

services:
  app:
    image: monica:fpm
    depends_on:
      - db
    environment:
      - APP_KEY=
      - DB_HOST=db
      - DB_USERNAME=usermonica
      - DB_PASSWORD=secret
    volumes:
      - data:/var/www/html/storage
    restart: always
  
  web:
    build: ./web
    ports:
      - 8080:80
    depends_on:
      - app
    volumes:
      - data:/var/www/html/storage:ro
    restart: always

  db:
    image: mysql:5.7
    environment:
      - MYSQL_RANDOM_ROOT_PASSWORD=true
      - MYSQL_DATABASE=monica
      - MYSQL_USER=usermonica
      - MYSQL_PASSWORD=secret
    volumes:
      - mysql:/var/lib/mysql
    restart: always

volumes:
  data:
    name: data
  mysql:
    name: mysql
  1. Set a value for APP_KEY variable before you run this setup. You can for instance copy and paste the output of

    echo -n 'base64:'; openssl rand -base64 32
  2. Run

    docker-compose up -d

    Wait until all migrations are done and then access Monica at http://localhost:8080/ from your host system. If this looks ok, add your first user account.

  3. Run this command once:

    docker-compose exec app php artisan setup:production

Make Monica available from the internet

To expose your Monica instance for the internet, it's important to set APP_ENV=production in your .env file or environment variables. In this case https scheme will be mandatory.

Using a proxy webserver on the host

One way to expose your Monica instance is to use a proxy webserver from your host with SSL capabilities. This is possible with a reverse proxy.

Using a proxy webserver container

See some examples of docker-compose possibilities in the example section to show how to a proxy webserver with ssl capabilities.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].