mirror of
https://github.com/ENSL/ensl.org.git
synced 2025-02-04 15:31:09 +00:00
Update docker-compose to work with DB out of box
This commit is contained in:
parent
dc332a8062
commit
79533b19a3
7 changed files with 17 additions and 4 deletions
|
@ -1,5 +1,6 @@
|
|||
Dockerfile
|
||||
db_data
|
||||
db/data/
|
||||
dkim
|
||||
log/*
|
||||
public/*
|
|
@ -6,6 +6,7 @@ RAILS_ENV=development
|
|||
APP_SECRET=fe837ea72667ec3d8ecb94cfba1a1bba
|
||||
|
||||
DEPLOY_PATH=/var/www
|
||||
FILES_PATH=/var/www/files
|
||||
|
||||
PUMA_WORKERS=0
|
||||
PUMA_MIN_THREADS=1
|
||||
|
|
|
@ -22,7 +22,10 @@ PUMA_PORT=4000
|
|||
# Use higher timeout if debug fails
|
||||
PUMA_TIMEOUT=30
|
||||
|
||||
# Docker adds mysql name to /etc/hosts
|
||||
# Path to files
|
||||
FILES_PATH=/var/www/files
|
||||
|
||||
# Docker adds mysql to hosts
|
||||
MYSQL_HOST=db
|
||||
|
||||
# This is used by both rails + mysql
|
||||
|
|
4
.gitignore
vendored
4
.gitignore
vendored
|
@ -18,6 +18,10 @@
|
|||
# Database and files
|
||||
db_data/*
|
||||
!db_data/.placeholder
|
||||
db/data/
|
||||
!db/data/.placeholder
|
||||
db/initdb.d/*
|
||||
!db/initdb.d/.placeholder
|
||||
*.sql*
|
||||
|
||||
# ignore dkim keys
|
||||
|
|
|
@ -33,6 +33,8 @@ First build the ENSL docker containers.
|
|||
|
||||
docker-compose build
|
||||
|
||||
Put any database dumps to `db/initdb.d`.
|
||||
|
||||
a) Then start for **production**:
|
||||
|
||||
docker-compose up
|
||||
|
|
0
db/initdb.d/.placeholder
Normal file
0
db/initdb.d/.placeholder
Normal file
|
@ -13,7 +13,7 @@ services:
|
|||
context: ./
|
||||
dockerfile: Dockerfile.dev
|
||||
# args:
|
||||
# buildno: 1
|
||||
# buildno: 1
|
||||
volumes:
|
||||
- ".:/var/www/"
|
||||
ports:
|
||||
|
@ -87,11 +87,13 @@ services:
|
|||
# Debug
|
||||
#command: bash
|
||||
#tty: true
|
||||
command: mysqld_safe --skip-grant-tables
|
||||
# command: mysqld_safe --skip-grant-tables
|
||||
image: mariadb:latest
|
||||
container_name: ensl_dev_db
|
||||
user: "mysql:mysql"
|
||||
volumes:
|
||||
- "./db_data:/var/lib/mysql"
|
||||
- "./db/data:/var/lib/mysql"
|
||||
- "./db/initdb.d:/docker-entrypoint-initdb.d"
|
||||
- "./ext/mysql.conf.d:/etc/mysql/conf.d"
|
||||
environment:
|
||||
- MYSQL_DATABASE=ensl
|
||||
|
|
Loading…
Reference in a new issue