Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
100 changes: 78 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,48 @@
# df-docker

Docker container for DreamFactory 4.x using Ubuntu 20.04, PHP 7.4 and NGINX.

<h1 align="center">
<a href="https://dreamfactory.com/"><img src="https://raw.githubusercontent.com/dreamfactorysoftware/dreamfactory/master/readme/vertical-logo-fullcolor.png" alt="DreamFactory" width="250" /></a>
</h1>

<p align="center">
Docker container for DreamFactory 4.x using Ubuntu 20.04, PHP 7.4 and NGINX.
</p>

<p align="center">
<a href="http://guide.dreamfactory.com/">Get Started Guide</a> ∙ <a href="https://genie.dreamfactory.com">Try Online</a> ∙ <a href="https://github.com/dreamfactorysoftware/dreamfactory/blob/master/CONTRIBUTING.md">Contribute</a> ∙ <a href="http://community.dreamfactory.com/">Community Support</a> ∙ <a href="https://wiki.dreamfactory.com">Docs</a>
</p>

<p align="center">
<img alt="GitHub" src="https://img.shields.io/github/license/dreamfactorysoftware/dreamfactory.svg?style=plastic">
<img alt="Docker Pulls" src="https://img.shields.io/docker/pulls/dreamfactorysoftware/df-docker.svg?style=plastic">
<img alt="GitHub Release Date" src="https://img.shields.io/github/release-date/dreamfactorysoftware/dreamfactory.svg?style=plastic">
</p>

<p align="center">
<a href="https://twitter.com/dfsoftwareinc?lang=en"><img alt="Twitter Follow" src="https://img.shields.io/twitter/follow/dfsoftwareinc.svg?style=social"></a>
</p>

## Table of Contents

* <a href="#prerequisites">Prerequisites</a>
* <a href="#installation">Installation</a>
* <a href="#licensed">DreamFactory Licensed Edition</a>
* <a href="#persistent">Persisting Data</a>
* <a href="#testing">Testing Data</a>
* <a href="#documentation">Documentation</a>
* <a href="#commercial">Commercial Licenses</a>
* <a href="#feedback">Feedback</a>

<a name="prerequisites"></a>
## Prerequisites

### Get Docker
### Install Docker
- See: [https://docs.docker.com/installation](https://docs.docker.com/installation)

### Get Docker Compose
### Install Docker Compose
- See [https://docs.docker.com/compose/install](https://docs.docker.com/compose/install)

### Persisting MySQL Data
After you have spun up your DreamFactory instance, take the APP_KEY value from the `.env` file in `/opt/dreamfactory` and then set this value as the APP_KEY value in the docker-compose.yml file (line 19) to avoid receiving "The MAC is invalid" errors within your instance should you ever need to rebuild.

## Configuration method docker-compose
The easiest way to configure the DreamFactory application is to use docker-compose.
<a name="installation"></a>
## Installing the DreamFactory Docker Container
The easiest way to configure the DreamFactory application is to use docker-compose. This will automatically spin up 4 containers, the DreamFactory application, MySQL container for the system database, Redis container for caching, and a <a href="#testing">Postgres database</a> with over 100k records preconfigured for testing.

### 1) Clone the df-docker repo
`cd ~/repos` (or wherever you want the clone of the repo to be)
Expand All @@ -40,16 +68,14 @@ The easiest way to configure the DreamFactory application is to use docker-compo
to stop and remove all containers including volumes use

docker-compose down -v

### 5) Add an entry to /etc/hosts
`127.0.0.1 dreamfactory.app`

### 6) Access the app
Go to 127.0.0.1 in your browser. It will take some time the first time. You will be asked to create your first admin user.
### 5) Access Admin UI
Go to `127.0.0.1` in your browser. It will take some time upon building, but you will be asked to create your first admin user.

## Running a licensed instance
<a name="licensed"></a>
## Running a Licensed Instance

### 1) Add the upgraded composer files to the df-docker directory
### 1) Add the license files to the `df-docker` directory

### 2) Uncomment lines 12 and 21 of `Dockerfile`

Expand All @@ -61,8 +87,38 @@ Go to 127.0.0.1 in your browser. It will take some time the first time. You will
### 5) Start containers
`docker-compose up -d`

### 6) Add an entry to /etc/hosts
`127.0.0.1 dreamfactory.app`
### 6) Access the app
Go to `127.0.0.1` in your browser. It will take some time upon building, but you will be asked to create your first admin user.

<a name="persistent"></a>
## Persisting System Database Configs
After you have spun up your DreamFactory instance, take the APP_KEY value from the `.env` file in `/opt/dreamfactory` and then set this value as the APP_KEY value in the docker-compose.yml file (line 19) to avoid receiving "The MAC is invalid" errors within your instance should you ever need to rebuild.

<a name="testing"></a>
## Testing Data
We mount a Postgres container that contains over 100k records to test without connecting your own data sets. To utilize the container you will use the following connection details.

Host: The host can be found by running the following Docker command: `docker inspect <container-id> | grep "IPAddress"`<br>
Port: 5432<br>
Database Name: dellstore<br>
Username: postgres<br>
Password: root_pw<br>

This will generate a fully documented and secure API from the Postgres container.

<a name="documentation"></a>
## Documentation

Learn more about DreamFactory's many features by reading our [Getting Started Guide](http://guide.dreamfactory.com/).
Additional platform documentation can be found on the [DreamFactory wiki](http://wiki.dreamfactory.com).

<a name="commercial"></a>
## Commercial Licenses

In need of official technical support? Desire access to REST API generators for SQL Server, Oracle, SOAP, or mobile
push notifications? Require API limiting and/or auditing? Schedule a demo [with our team](https://www.dreamfactory.com/demo/)!

<a name="feedback"></a>
## Feedback and Contributions

### 7) Access the app
Go to 127.0.0.1 in your browser. It will take some time the first time. You will be asked to create your first admin user.
Feedback is welcome on our [forum](http://community.dreamfactory.com/) or in the form of pull requests and/or issues. Contributions should follow the strategy outlined in ["Contributing to a project"](http://help.github.com/articles/fork-a-repo#contributing-to-a-project).
9 changes: 8 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@ services:
image: mysql:5.7
volumes:
- df-mysql:/var/lib/mysql

example_data:
environment:
DATASETS: pagila
POSTGRES_PASSWORD: root_pw
image: aa8y/postgres-dataset

redis:
image: redis

Expand Down Expand Up @@ -65,4 +72,4 @@ volumes:
df-storage:
driver: local
df-mysql:
driver: local
driver: local