1
0
mirror of https://github.com/jcwimer/wrestlingApp synced 2026-03-25 01:14:43 +00:00

Added env variables and a production docker setup

This commit is contained in:
2015-10-22 16:14:50 -04:00
parent d1949dc75e
commit 9d6b8bd107
10 changed files with 79 additions and 7 deletions

8
deploy/deploy-prod.sh Executable file
View File

@@ -0,0 +1,8 @@
gpg prod.env.gpg
cd ..
bash rails-prod.sh wrestlingdev
cd deploy
sudo docker-compose -f docker-compose-prod.yml up -d
echo Make sure your local mysql database has a db for wrestlingdev
echo "mysqldump -u guy -ppassword -h host database_name > database.sql"
echo "mysql -u guy -ppassword -h host database_name < database.sql"

5
deploy/deploy-test.sh Executable file
View File

@@ -0,0 +1,5 @@
cd ..
bash rails-prod.sh wrestlingdev
cd deploy
sudo docker-compose -f docker-compose-test.yml up -d
echo Make sure your local mysql database has a wrestlingtourney db

View File

@@ -0,0 +1,21 @@
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

View File

@@ -0,0 +1,14 @@
app:
extends:
file: docker-compose-common.yml
service: app
links:
- db
restart: always
env_file: prod.env
db:
extends:
file: docker-compose-common.yml
service: app
restart: always
env_file: prod.env

View File

@@ -0,0 +1,21 @@
app:
extends:
file: docker-compose-common.yml
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
links:
- db
restart: always
db:
extends:
file: docker-compose-common.yml
service: app
environment:
- MYSQL_ROOT_PASSWORD=password
restart: always

BIN
deploy/prod.env.gpg Normal file

Binary file not shown.