mirror of https://github.com/MISP/misp-docker
Use .env file instead of hard coded environment variables (#41)
Use .env file instead of hard coded environment variables
commit
5d7bc41a28
|
@ -0,0 +1,2 @@
|
||||||
|
.env
|
||||||
|
data
|
10
README.md
10
README.md
|
@ -34,14 +34,8 @@ $ git clone https://github.com/MISP/misp-docker
|
||||||
$ cd misp-docker
|
$ cd misp-docker
|
||||||
```
|
```
|
||||||
## Fix your environment
|
## Fix your environment
|
||||||
Edit the docker-compose.yml and change the following environment variables:
|
Copy template.env to .env (on the root directory) and edit the environment variables at .env file
|
||||||
* MYSQL_DATABASE
|
|
||||||
* MYSQL_USER
|
|
||||||
* MYSQL_PASSWORD
|
|
||||||
* MYSQL_ROOT_PASSWORD
|
|
||||||
* MYSQL_MISP_PASSWORD
|
|
||||||
* MISP_ADMIN_PASSPHRASE
|
|
||||||
* Changed the volumes to match your local filesystem
|
|
||||||
|
|
||||||
## Build the containers
|
## Build the containers
|
||||||
```
|
```
|
||||||
|
|
|
@ -18,27 +18,27 @@ services:
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
volumes:
|
volumes:
|
||||||
- /dev/urandom:/dev/random
|
- /dev/urandom:/dev/random
|
||||||
- /data/misp/web:/var/www/MISP
|
- ${DATA_DIR}/web:/var/www/MISP
|
||||||
environment:
|
environment:
|
||||||
- MYSQL_HOST=db
|
- MYSQL_HOST=db
|
||||||
- MYSQL_DATABASE=misp
|
- MYSQL_DATABASE=${MYSQL_DATABASE}
|
||||||
- MYSQL_USER=misp
|
- MYSQL_USER=${MYSQL_USER}
|
||||||
- MYSQL_PASSWORD=misp
|
- MYSQL_PASSWORD=${MYSQL_PASSWORD}
|
||||||
- MISP_ADMIN_EMAIL=admin@admin.test
|
- MISP_ADMIN_EMAIL=${MISP_ADMIN_EMAIL}
|
||||||
- MISP_ADMIN_PASSPHRASE=admin
|
- MISP_ADMIN_PASSPHRASE=${MISP_ADMIN_PASSPHRASE}
|
||||||
- MISP_BASEURL=http:\/\/misp\.test
|
- MISP_BASEURL=${MISP_BASEURL}
|
||||||
- POSTFIX_RELAY_HOST=relay.fqdn
|
- POSTFIX_RELAY_HOST=${POSTFIX_RELAY_HOST}
|
||||||
- TIMEZONE=Europe/Brussels
|
- TIMEZONE=${TIMEZONE}
|
||||||
|
|
||||||
db:
|
db:
|
||||||
container_name: misp_db
|
container_name: misp_db
|
||||||
image: mysql/mysql-server:5.7
|
image: mysql/mysql-server:5.7
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
volumes:
|
volumes:
|
||||||
- /data/misp/db:/var/lib/mysql
|
- ${DATA_DIR}/db:/var/lib/mysql
|
||||||
environment:
|
environment:
|
||||||
- MYSQL_DATABASE=misp
|
- MYSQL_DATABASE=${MYSQL_DATABASE}
|
||||||
- MYSQL_USER=misp
|
- MYSQL_USER=${MYSQL_USER}
|
||||||
- MYSQL_PASSWORD=misp
|
- MYSQL_PASSWORD=${MYSQL_PASSWORD}
|
||||||
- MYSQL_ROOT_PASSWORD=misp
|
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
|
||||||
|
|
||||||
|
|
|
@ -12,26 +12,26 @@ services:
|
||||||
- "80:80"
|
- "80:80"
|
||||||
volumes:
|
volumes:
|
||||||
- /dev/urandom:/dev/random
|
- /dev/urandom:/dev/random
|
||||||
- /data/misp/web:/var/www/MISP
|
- ${DATA_DIR}/web:/var/www/MISP
|
||||||
environment:
|
environment:
|
||||||
- MYSQL_HOST=db
|
- MYSQL_HOST=db
|
||||||
- MYSQL_DATABASE=misp
|
- MYSQL_DATABASE=${MYSQL_DATABASE}
|
||||||
- MYSQL_USER=misp
|
- MYSQL_USER=${MYSQL_USER}
|
||||||
- MYSQL_PASSWORD=misp
|
- MYSQL_PASSWORD=${MYSQL_PASSWORD}
|
||||||
- MISP_ADMIN_EMAIL=admin@admin.test
|
- MISP_ADMIN_EMAIL=${MISP_ADMIN_EMAIL}
|
||||||
- MISP_ADMIN_PASSPHRASE=admin
|
- MISP_ADMIN_PASSPHRASE=${MISP_ADMIN_PASSPHRASE}
|
||||||
- MISP_BASEURL=http:\/\/misp\.test
|
- MISP_BASEURL=${MISP_BASEURL}
|
||||||
- POSTFIX_RELAY_HOST=relay.fqdn
|
- POSTFIX_RELAY_HOST=${POSTFIX_RELAY_HOST}
|
||||||
- TIMEZONE=Europe/Brussels
|
- TIMEZONE=${TIMEZONE}
|
||||||
|
|
||||||
db:
|
db:
|
||||||
container_name: misp_db
|
container_name: misp_db
|
||||||
image: mysql/mysql-server:5.7
|
image: mysql/mysql-server:5.7
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
volumes:
|
volumes:
|
||||||
- /data/misp/db:/var/lib/mysql
|
- ${DATA_DIR}/db:/var/lib/mysql
|
||||||
environment:
|
environment:
|
||||||
- MYSQL_DATABASE=misp
|
- MYSQL_DATABASE=${MYSQL_DATABASE}
|
||||||
- MYSQL_USER=misp
|
- MYSQL_USER=${MYSQL_USER}
|
||||||
- MYSQL_PASSWORD=misp
|
- MYSQL_PASSWORD=${MYSQL_PASSWORD}
|
||||||
- MYSQL_ROOT_PASSWORD=misp
|
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
MYSQL_DATABASE=misp
|
||||||
|
MYSQL_USER=misp
|
||||||
|
MYSQL_PASSWORD=misp
|
||||||
|
MYSQL_ROOT_PASSWORD=misp
|
||||||
|
|
||||||
|
MISP_ADMIN_EMAIL=admin@admin.test
|
||||||
|
MISP_ADMIN_PASSPHRASE=admin
|
||||||
|
MISP_BASEURL=localhost
|
||||||
|
|
||||||
|
POSTFIX_RELAY_HOST=relay.fqdn
|
||||||
|
TIMEZONE=Europe/Brussels
|
||||||
|
|
||||||
|
DATA_DIR=./data
|
Loading…
Reference in New Issue