mirror of
https://github.com/EpicMorg/docker-scripts.git
synced 2024-12-25 22:25:40 +03:00
db-status
This commit is contained in:
parent
75b363553e
commit
780d4e4ed1
@ -23,10 +23,10 @@ RUN cd /opt && \
|
||||
bundle update --all && \
|
||||
bundle install --deployment --without development:test
|
||||
|
||||
ENTRYPOINT /entrypoint.sh
|
||||
|
||||
# Persists copies of other relevant files (DB config, custom themes). Contents of this are copied
|
||||
# to the relevant places each time the container is started
|
||||
VOLUME /opt/staytus/persisted
|
||||
|
||||
EXPOSE 5000
|
||||
|
||||
ENTRYPOINT /entrypoint.sh
|
@ -2,6 +2,7 @@
|
||||
|
||||
: ${DB_USER:=root}
|
||||
: ${DB_PASSWORD:=root}
|
||||
: ${DB_DB_DATABSE:=staytus}
|
||||
: ${DB_HOST:=127.0.0.1}
|
||||
#: ${DB_PORT:=3306}
|
||||
|
||||
@ -18,6 +19,7 @@ if [ ! -f /opt/staytus/persisted/config/database.yml ]; then
|
||||
sed -i "s/username:.*/username: ${DB_USER}/" config/database.yml
|
||||
sed -i "s|password:.*|password: ${DB_PASSWORD}|" config/database.yml
|
||||
sed -i "s|host:.*|host: ${DB_HOST}|" config/database.yml
|
||||
sed -i "s|database:.*|database: ${DB_DATABSE}|" config/database.yml
|
||||
|
||||
# Copy the config to persist it, and later copy back on each start, to persist this config file
|
||||
# without persisting all of /config (which is mostly app code)
|
||||
|
Loading…
Reference in New Issue
Block a user