-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
79c2ad2
commit 18dd1f4
Showing
10 changed files
with
170 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,49 @@ | ||
# docker | ||
# YetiForceCRM Docker | ||
|
||
Official YetiForce Docker image | ||
|
||
## Instructions | ||
|
||
### Production | ||
|
||
To start YetiForce in a production configuration: | ||
1. In the `.env` file set the `HOSTNAME` to the where you will be running YetiForce and set `TLS_EMAIL` to your email address. Those settings will make sure that your website has a proper TLS certificate. | ||
2. Download the YetiForce code: `git submodule update --init`. | ||
3. Run `docker compose up -d`. | ||
4. Go to `https://HOSTNAME` and go through the installation process. For your database settings, enter: | ||
- Address: db | ||
- Port: 3306 | ||
- Username: yeti | ||
- Password: yeti | ||
- Database name: yetiforce | ||
|
||
### Development | ||
|
||
This image can also work in development mode. This mode is designed for actively making changes in YF itself. As such, it includes the following changes: | ||
- YetiForce is run from the `./YetiForceCRM` directory | ||
- MariaDB is available on `localhost:3306` | ||
- PHP has a development configuration | ||
|
||
This means that you will be able to make changes in `./YetiForceCRM`, see them reflected in your browser, and commit them normally. | ||
|
||
To run in this mode: | ||
1. Add a line with `127.0.0.1 yeti` to `/etc/hosts` on Unix or `C:\Windows\System32\drivers\etc\hosts` on Windows. | ||
2. Download the YetiForce code: `git submodule update --init`. | ||
3. Install YetiForce dependencies: | ||
```shell | ||
cd ./YetiForceCRM | ||
install -m755 -d YetiForceCRM/config/Modules | ||
yarn install --modules-folder "./public_html/libraries" --ignore-optional --production=true | ||
cd public_html/src | ||
yarn install --ignore-optional --production=true | ||
cd ../.. | ||
composer --no-interaction install --no-dev | ||
cd .. | ||
``` | ||
4. Start the server with `docker compose -f docker-compose.yaml -f docker-compose.dev.yaml up -d` | ||
4. Go to `https://HOSTNAME` and go through the installation process. For your database settings, enter: | ||
- Address: db | ||
- Port: 3306 | ||
- Username: yeti | ||
- Password: yeti | ||
- Database name: yetiforce |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
auto_https disable_redirects | ||
} | ||
|
||
{$HOSTNAME}:443 { | ||
tls {$TLS_EMAIL} | ||
reverse_proxy nginx:80 | ||
} | ||
|
||
{$HOSTNAME}:80 { | ||
reverse_proxy nginx:80 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
name: yetiforce-dev | ||
version: '3' | ||
services: | ||
db: | ||
ports: | ||
- 3306:3306 | ||
php: | ||
build: | ||
target: php-dev | ||
volumes: | ||
- type: bind | ||
source: ./YetiForceCRM | ||
target: /var/www/html | ||
|
||
volumes: | ||
crm_data: null |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
FROM nginx:stable AS nginx | ||
|
||
SHELL ["/bin/bash", "-o", "pipefail", "-c"] | ||
|
||
RUN apt-get update && \ | ||
apt-get install --no-install-recommends -y \ | ||
nginx-extras \ | ||
&& apt-get clean \ | ||
&& rm -rf /etc/nginx/conf.d/* /etc/nginx/sites-enabled/* /var/lib/apt/lists/* | ||
|
||
COPY ./YetiForceCRM/tests/setup/nginx/yetiforce.conf /etc/nginx/yetiforce.conf | ||
COPY ./nginx/docker.conf /etc/nginx/conf.d/default.conf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
############################################## | ||
# Best configuration for YetiForceCRM # | ||
# Created by [email protected] # | ||
# Modified to work with Docker # | ||
############################################## | ||
# HTTP | ||
server { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1 @@ | ||
open_basedir="/var/www/html" | ||
session.cookie_samesite="Strict" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
[www] | ||
|
||
env[PROVIDER] = docker | ||
php_admin_value[error_log] = /var/log/php/fpm_yfprod_error.log | ||
php_admin_value[open_basedir] = /var/www/html/:/tmp/:/var/tmp/:/etc/nginx/ssl/:/etc/ssl/:/usr/bin/gpg:/usr/bin/gpg-agent:/usr/bin/gpgconf | ||
clear_env = no | ||
request_terminate_timeout = 600 | ||
pm.process_idle_timeout = 600s; | ||
pm.max_requests = 5000 | ||
catch_workers_output = yes |