diff --git a/containers/docker-compose-production.yml b/containers/docker-compose-production.yml index f971cc2e33..efc92402fb 100644 --- a/containers/docker-compose-production.yml +++ b/containers/docker-compose-production.yml @@ -1,32 +1,13 @@ version: "2" services: - db: - ports: - - "127.0.0.1:3307:3306" - image: mariadb:10.2 - restart: unless-stopped + web: + build: . + network_mode: "host" + command: /bin/bash -c "sleep 5 && passenger start --max-pool-size 9 --min-instances 9 -p 4001 -a 127.0.0.1" environment: - - MYSQL_DATABASE=plots_$RAILS_ENV - - MYSQL_USER=plots - - MYSQL_PASSWORD=plots - - MYSQL_RANDOM_ROOT_PASSWORD=true + - RAILS_ENV=${RAILS_ENV} + - SECRET_KEY_BASE=${SECRET_KEY_BASE} volumes: - - ./config/my.cnf:/etc/mysql/my.cnf - # for configuration - - ../mysql:/var/lib/mysql - # for persistence - - ../dump:/docker-entrypoint-initdb.d - # for importing a dump - # if you want to re-import simply put away ../mysql/* -# web: -# build: . -# command: /bin/bash -c "sleep 5 && bundle exec rails s -p 4000 -b '0.0.0.0'" -# environment: -# - RAILS_ENV=${RAILS_ENV} -# volumes: -# - .:/app -# ports: -# - "127.0.0.1:4001:4000" -# links: -# - db -# restart: unless-stopped + - .:/app + - /etc/passwd:/etc/passwd:ro + - /etc/group:/etc/group:ro diff --git a/containers/docker-compose-stable.yml b/containers/docker-compose-stable.yml index 4e5f478ffd..f089201bec 100644 --- a/containers/docker-compose-stable.yml +++ b/containers/docker-compose-stable.yml @@ -8,23 +8,23 @@ services: - MYSQL_PASSWORD=plots - MYSQL_RANDOM_ROOT_PASSWORD=true volumes: - - ../mysql:/var/lib/mysql + - ../config/my.cnf:/etc/mysql/my.cnf + # for configuration + - ../../mysql:/var/lib/mysql # for persistence - - ../dump:/docker-entrypoint-initdb.d - # for importing a dump - # if you want to re-import simply put away ../mysql/* + - ../../dump:/docker-entrypoint-initdb.d + # mporting a dump + # if you want to re-import simply put away ../../mysql/* web: - build: . - command: /bin/bash -c "sleep 5 && passenger start -p 4000" + build: .. + command: /bin/bash -c "sleep 5 && /usr/local/bundle/bin/passenger start -p 4000" environment: - RAILS_ENV=${RAILS_ENV} - - SOLR_URL=${SOLR_URL} - SECRET_KEY_BASE=${SECRET_KEY_BASE} - - DISABLE_SOLR_CHECK=1 volumes: - - .:/app + - ..:/app ports: - "127.0.0.1:4000:4000" links: - db -# restart: unless-stopped + restart: unless-stopped diff --git a/containers/docker-compose-unstable.yml b/containers/docker-compose-unstable.yml index d0844736bc..bb857ca7b6 100644 --- a/containers/docker-compose-unstable.yml +++ b/containers/docker-compose-unstable.yml @@ -8,23 +8,23 @@ services: - MYSQL_PASSWORD=plots - MYSQL_RANDOM_ROOT_PASSWORD=true volumes: - - ./config/my.cnf:/etc/mysql/my.cnf + - ../config/my.cnf:/etc/mysql/my.cnf # for configuration - - ../mysql:/var/lib/mysql + - ../../mysql:/var/lib/mysql # for persistence - - ../dump:/docker-entrypoint-initdb.d + - ../../dump:/docker-entrypoint-initdb.d # for importing a dump - # if you want to re-import simply put away ../mysql/* + # if you want to re-import simply put away ../../mysql/* web: - build: . - command: /bin/bash -c "sleep 5 && passenger start -p 5001" + build: .. + command: /bin/bash -c "sleep 5 && bundle exec rails s -p 5001 -b '0.0.0.0'" environment: - RAILS_ENV=${RAILS_ENV} - SECRET_KEY_BASE=${SECRET_KEY_BASE} volumes: - - .:/app + - ..:/app ports: - "127.0.0.1:5001:5001" links: - db -# restart: unless-stopped + restart: unless-stopped