docker部署整理-gitea环境变量
This commit is contained in:
parent
3646822ec3
commit
b45fb35ea1
|
@ -1,6 +1,8 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
bash -l -c "source /etc/profile.d/rvm.sh"
|
bash -l -c "source /etc/profile.d/rvm.sh"
|
||||||
|
export PATH=/usr/local/rvm/gems/ruby-2.4.5/bin:/usr/local/rvm/gems/ruby-2.4.5@global/bin:/usr/local/rvm/rubies/ruby-2.4.5/bin:$PATH
|
||||||
bash -c "RAILS_ENV=production rails db:create"
|
bash -c "RAILS_ENV=production rails db:create"
|
||||||
bash -c "RAILS_ENV=production bundle exec rake sync_table_structure:import_csv"
|
bash -c "RAILS_ENV=production bundle exec rake sync_table_structure:import_csv"
|
||||||
bash -c "RAILS_ENV=production rails db:migrate"
|
bash -c "RAILS_ENV=production rails db:migrate"
|
||||||
bash -c "rm -f tmp/pids/server.pid && rails s -p 4000 -b '0.0.0.0'"
|
#bash -c "rm -f tmp/pids/server.pid && RAILS_ENV=production rails s -p 4000 -b '0.0.0.0'"
|
||||||
|
bash -c "RAILS_ENV=production puma -C config/puma.rb"
|
|
@ -9,7 +9,7 @@ services:
|
||||||
command: --sql-mode=""
|
command: --sql-mode=""
|
||||||
restart: always
|
restart: always
|
||||||
volumes:
|
volumes:
|
||||||
- ./mysql:/var/lib/mysql
|
- ./data/mysql:/var/lib/mysql
|
||||||
ports:
|
ports:
|
||||||
- "13306:3306"
|
- "13306:3306"
|
||||||
environment:
|
environment:
|
||||||
|
@ -51,6 +51,8 @@ services:
|
||||||
context: ./
|
context: ./
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
environment:
|
environment:
|
||||||
|
- GEM_PATH=/usr/local/rvm/gems/ruby-2.4.5:/usr/local/rvm/gems/ruby-2.4.5@global
|
||||||
|
- GEM_HOME=/usr/local/rvm/gems/ruby-2.4.5
|
||||||
- MYSQL_USER=root
|
- MYSQL_USER=root
|
||||||
- MYSQL_PWD=gitea
|
- MYSQL_PWD=gitea
|
||||||
- MYSQL_HOST=mysql
|
- MYSQL_HOST=mysql
|
||||||
|
|
Loading…
Reference in New Issue