mirror of
https://github.com/jcwimer/wrestlingApp
synced 2026-04-06 22:44:14 +00:00
Updating to compose api version 3.3
This commit is contained in:
@@ -1,7 +1,8 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
project_dir="$(dirname $( dirname $(readlink -f ${BASH_SOURCE[0]})))"
|
project_dir="$(dirname $( dirname $(readlink -f ${BASH_SOURCE[0]})))"
|
||||||
|
|
||||||
docker build -t wrestlingdev -f ${project_dir}/deploy/rails-prod-Dockerfile ${project_dir}
|
docker build -t wrestlingdev:test -f ${project_dir}/deploy/rails-prod-Dockerfile ${project_dir}
|
||||||
docker-compose -f ${project_dir}/deploy/docker-compose-test.yml kill
|
docker-compose -f ${project_dir}/deploy/docker-compose-test.yml kill
|
||||||
|
#docker-compose -f ${project_dir}/deploy/docker-compose-test.yml pull
|
||||||
docker-compose -f ${project_dir}/deploy/docker-compose-test.yml up -d
|
docker-compose -f ${project_dir}/deploy/docker-compose-test.yml up -d
|
||||||
echo Make sure your local mysql database has a wrestlingtourney db
|
echo Make sure your local mysql database has a wrestlingtourney db
|
||||||
|
|||||||
@@ -1,25 +0,0 @@
|
|||||||
app:
|
|
||||||
image: wrestlingdev
|
|
||||||
ports:
|
|
||||||
- "80:80"
|
|
||||||
- "443:443"
|
|
||||||
jobs:
|
|
||||||
image: wrestlingdev
|
|
||||||
command: bundle exec rake:jobs
|
|
||||||
db:
|
|
||||||
image: mysql:5.5
|
|
||||||
ports:
|
|
||||||
- "3306:3306"
|
|
||||||
volumes:
|
|
||||||
- /srv/docker/mysql:/var/lib/mysql
|
|
||||||
|
|
||||||
email:
|
|
||||||
image: postfix
|
|
||||||
|
|
||||||
memcached:
|
|
||||||
image: memcached
|
|
||||||
mem_limit: 64000000
|
|
||||||
|
|
||||||
worker:
|
|
||||||
image: wrestlingdev
|
|
||||||
command: /bin/bash -c "cd /rails && bundle exec rake jobs:work RAILS_ENV=production"
|
|
||||||
@@ -1,36 +1,54 @@
|
|||||||
app:
|
version: "3.3"
|
||||||
extends:
|
networks:
|
||||||
file: docker-compose-common.yml
|
database:
|
||||||
service: app
|
caching:
|
||||||
image: wrestlingdev-prod
|
|
||||||
links:
|
|
||||||
- db
|
|
||||||
restart: always
|
|
||||||
env_file:
|
|
||||||
- ./prod.env
|
|
||||||
db:
|
|
||||||
extends:
|
|
||||||
file: docker-compose-common.yml
|
|
||||||
service: db
|
|
||||||
restart: always
|
|
||||||
env_file:
|
|
||||||
- ./prod.env
|
|
||||||
worker:
|
|
||||||
extends:
|
|
||||||
file: docker-compose-common.yml
|
|
||||||
service: worker
|
|
||||||
image: wrestlingdev-prod
|
|
||||||
links:
|
|
||||||
- db
|
|
||||||
restart: always
|
|
||||||
env_file:
|
|
||||||
- ./prod.env
|
|
||||||
healthcheck:
|
|
||||||
test: ps -ef | grep rake | grep ruby
|
|
||||||
command: bundle exec rake jobs:work RAILS_ENV=production
|
|
||||||
|
|
||||||
memcached:
|
volumes:
|
||||||
extends:
|
mysql:
|
||||||
file: docker-compose-common.yml
|
|
||||||
service: memcached
|
services:
|
||||||
restart: always
|
app:
|
||||||
|
image: wrestlingdev-prod
|
||||||
|
ports:
|
||||||
|
- "80:80"
|
||||||
|
- "443:443"
|
||||||
|
networks:
|
||||||
|
database:
|
||||||
|
caching:
|
||||||
|
restart: always
|
||||||
|
env_file:
|
||||||
|
- ./prod.env
|
||||||
|
healthcheck:
|
||||||
|
test: curl --insecure https://127.0.0.1/
|
||||||
|
|
||||||
|
db:
|
||||||
|
image: mysql:5.5
|
||||||
|
ports:
|
||||||
|
- "3306:3306"
|
||||||
|
volumes:
|
||||||
|
- mysql:/var/lib/mysql
|
||||||
|
restart: always
|
||||||
|
env_file:
|
||||||
|
- ./prod.env
|
||||||
|
networks:
|
||||||
|
database:
|
||||||
|
|
||||||
|
worker:
|
||||||
|
image: wrestlingdev-prod
|
||||||
|
networks:
|
||||||
|
database:
|
||||||
|
caching:
|
||||||
|
restart: always
|
||||||
|
env_file:
|
||||||
|
- ./prod.env
|
||||||
|
healthcheck:
|
||||||
|
test: ps -ef | grep rake | grep ruby
|
||||||
|
command: bundle exec rake jobs:work RAILS_ENV=production
|
||||||
|
|
||||||
|
|
||||||
|
memcached:
|
||||||
|
image: memcached
|
||||||
|
mem_limit: 64000000
|
||||||
|
restart: always
|
||||||
|
networks:
|
||||||
|
caching:
|
||||||
@@ -1,59 +1,103 @@
|
|||||||
app:
|
version: "3.3"
|
||||||
image: registry:5000/wrestlingdev:dev
|
networks:
|
||||||
extends:
|
database:
|
||||||
file: docker-compose-common.yml
|
caching:
|
||||||
service: app
|
|
||||||
environment:
|
|
||||||
- WRESTLINGDEV_DB_NAME=wrestlingtourney
|
|
||||||
- WRESTLINGDEV_DB_USR=root
|
|
||||||
- WRESTLINGDEV_DB_PWD=password
|
|
||||||
- WRESTLINGDEV_DB_HOST=db
|
|
||||||
- WRESTLINGDEV_DB_PORT=3306
|
|
||||||
- WRESTLINGDEV_DEVISE_SECRET_KEY=2f29d49db6704377ba263f7cb9db085b386bcb301c0cd501126a674686ab1a109754071165b08cd72af03cec4642a4dd04361c994462254dd5d85e9594e8b9aa
|
|
||||||
- WRESTLINGDEV_SECRET_KEY_BASE=077cdbef5c2ccf22543fb17a67339f234306b7fa2e1e4463d851c444c10a5611829a2290b253da78339427f131571fac9a42c83d960b2d25ecc10a4a0a7ce1a2
|
|
||||||
- MEMCACHIER_SERVERS=memcached:11211
|
|
||||||
- MEMCACHIER_USERNAME=
|
|
||||||
- MEMCACHIER_PASSWORD=
|
|
||||||
links:
|
|
||||||
- db
|
|
||||||
- memcached
|
|
||||||
restart: always
|
|
||||||
|
|
||||||
db:
|
volumes:
|
||||||
extends:
|
mysql:
|
||||||
file: docker-compose-common.yml
|
|
||||||
service: db
|
|
||||||
environment:
|
|
||||||
- MYSQL_ROOT_PASSWORD=password
|
|
||||||
restart: always
|
|
||||||
|
|
||||||
worker:
|
services:
|
||||||
image: registry:5000/wrestlingdev:dev
|
app:
|
||||||
extends:
|
image: wrestlingdev:dev
|
||||||
file: docker-compose-common.yml
|
environment:
|
||||||
service: worker
|
- WRESTLINGDEV_DB_NAME=wrestlingtourney
|
||||||
environment:
|
- WRESTLINGDEV_DB_USR=root
|
||||||
- WRESTLINGDEV_DB_NAME=wrestlingtourney
|
- WRESTLINGDEV_DB_PWD=password
|
||||||
- WRESTLINGDEV_DB_USR=root
|
- WRESTLINGDEV_DB_HOST=db
|
||||||
- WRESTLINGDEV_DB_PWD=password
|
- WRESTLINGDEV_DB_PORT=3306
|
||||||
- WRESTLINGDEV_DB_HOST=db
|
- WRESTLINGDEV_DEVISE_SECRET_KEY=2f29d49db6704377ba263f7cb9db085b386bcb301c0cd501126a674686ab1a109754071165b08cd72af03cec4642a4dd04361c994462254dd5d85e9594e8b9aa
|
||||||
- WRESTLINGDEV_DB_PORT=3306
|
- WRESTLINGDEV_SECRET_KEY_BASE=077cdbef5c2ccf22543fb17a67339f234306b7fa2e1e4463d851c444c10a5611829a2290b253da78339427f131571fac9a42c83d960b2d25ecc10a4a0a7ce1a2
|
||||||
- WRESTLINGDEV_DEVISE_SECRET_KEY=2f29d49db6704377ba263f7cb9db085b386bcb301c0cd501126a674686ab1a109754071165b08cd72af03cec4642a4dd04361c994462254dd5d85e9594e8b9aa
|
- MEMCACHIER_SERVERS=memcached:11211
|
||||||
- WRESTLINGDEV_SECRET_KEY_BASE=077cdbef5c2ccf22543fb17a67339f234306b7fa2e1e4463d851c444c10a5611829a2290b253da78339427f131571fac9a42c83d960b2d25ecc10a4a0a7ce1a2
|
- MEMCACHIER_USERNAME=
|
||||||
- MEMCACHIER_SERVERS=memcached:11211
|
- MEMCACHIER_PASSWORD=
|
||||||
- MEMCACHIER_USERNAME=
|
networks:
|
||||||
- MEMCACHIER_PASSWORD=
|
database:
|
||||||
links:
|
caching:
|
||||||
- db
|
restart: always
|
||||||
- memcached
|
ports:
|
||||||
restart: always
|
- "80:80"
|
||||||
healthcheck:
|
- "443:443"
|
||||||
test: ps -ef | grep rake | grep ruby
|
deploy:
|
||||||
command: bundle exec rake jobs:work RAILS_ENV=production
|
resources:
|
||||||
|
limits:
|
||||||
|
cpus: '0.25'
|
||||||
|
memory: 512M
|
||||||
|
reservations:
|
||||||
|
cpus: '0.25'
|
||||||
|
memory: 256M
|
||||||
|
healthcheck:
|
||||||
|
test: curl --insecure https://127.0.0.1/
|
||||||
|
|
||||||
memcached:
|
db:
|
||||||
extends:
|
image: mysql:5.5
|
||||||
file: docker-compose-common.yml
|
ports:
|
||||||
service: memcached
|
- "3306:3306"
|
||||||
restart: always
|
volumes:
|
||||||
|
- mysql:/var/lib/mysql
|
||||||
|
environment:
|
||||||
|
- MYSQL_ROOT_PASSWORD=password
|
||||||
|
restart: always
|
||||||
|
networks:
|
||||||
|
database:
|
||||||
|
deploy:
|
||||||
|
resources:
|
||||||
|
limits:
|
||||||
|
cpus: '0.25'
|
||||||
|
memory: 512M
|
||||||
|
reservations:
|
||||||
|
cpus: '0.25'
|
||||||
|
memory: 256M
|
||||||
|
|
||||||
|
worker:
|
||||||
|
image: wrestlingdev:dev
|
||||||
|
environment:
|
||||||
|
- WRESTLINGDEV_DB_NAME=wrestlingtourney
|
||||||
|
- WRESTLINGDEV_DB_USR=root
|
||||||
|
- WRESTLINGDEV_DB_PWD=password
|
||||||
|
- WRESTLINGDEV_DB_HOST=db
|
||||||
|
- WRESTLINGDEV_DB_PORT=3306
|
||||||
|
- WRESTLINGDEV_DEVISE_SECRET_KEY=2f29d49db6704377ba263f7cb9db085b386bcb301c0cd501126a674686ab1a109754071165b08cd72af03cec4642a4dd04361c994462254dd5d85e9594e8b9aa
|
||||||
|
- WRESTLINGDEV_SECRET_KEY_BASE=077cdbef5c2ccf22543fb17a67339f234306b7fa2e1e4463d851c444c10a5611829a2290b253da78339427f131571fac9a42c83d960b2d25ecc10a4a0a7ce1a2
|
||||||
|
- MEMCACHIER_SERVERS=memcached:11211
|
||||||
|
- MEMCACHIER_USERNAME=
|
||||||
|
- MEMCACHIER_PASSWORD=
|
||||||
|
networks:
|
||||||
|
database:
|
||||||
|
caching:
|
||||||
|
restart: always
|
||||||
|
healthcheck:
|
||||||
|
test: ps -ef | grep rake | grep ruby
|
||||||
|
command: bundle exec rake jobs:work RAILS_ENV=production
|
||||||
|
deploy:
|
||||||
|
resources:
|
||||||
|
limits:
|
||||||
|
cpus: '0.25'
|
||||||
|
memory: 512M
|
||||||
|
reservations:
|
||||||
|
cpus: '0.25'
|
||||||
|
memory: 256M
|
||||||
|
|
||||||
|
memcached:
|
||||||
|
image: memcached
|
||||||
|
deploy:
|
||||||
|
resources:
|
||||||
|
limits:
|
||||||
|
cpus: '0.10'
|
||||||
|
memory: 64M
|
||||||
|
reservations:
|
||||||
|
cpus: '0.10'
|
||||||
|
memory: 64M
|
||||||
|
restart: always
|
||||||
|
networks:
|
||||||
|
caching:
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user