mirror of
https://github.com/basecamp/once-campfire.git
synced 2026-10-28 08:26:48 +09:00
Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c1d304999d |
No files matched your search
@@ -66,6 +66,9 @@ ENV HTTP_WRITE_TIMEOUT=300
|
|||||||
COPY --from=build --chown=rails:rails /usr/local/bundle /usr/local/bundle
|
COPY --from=build --chown=rails:rails /usr/local/bundle /usr/local/bundle
|
||||||
COPY --from=build --chown=rails:rails /rails /rails
|
COPY --from=build --chown=rails:rails /rails /rails
|
||||||
|
|
||||||
|
# Install ONCE backup/restore hooks
|
||||||
|
COPY --chmod=755 hooks /hooks
|
||||||
|
|
||||||
# Set version and revision
|
# Set version and revision
|
||||||
ARG APP_VERSION
|
ARG APP_VERSION
|
||||||
ENV APP_VERSION=$APP_VERSION
|
ENV APP_VERSION=$APP_VERSION
|
||||||
|
|||||||
Executable
+12
@@ -0,0 +1,12 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
db_name="${RAILS_ENV:-production}.sqlite3"
|
||||||
|
snapshot="/rails/storage/backups/$db_name"
|
||||||
|
db="/rails/storage/db/$db_name"
|
||||||
|
|
||||||
|
if [ -f "$snapshot" ]; then
|
||||||
|
mkdir -p "$(dirname "$db")"
|
||||||
|
cp "$snapshot" "$db"
|
||||||
|
rm -f "$db-wal" "$db-shm"
|
||||||
|
fi
|
||||||
Executable
+2
@@ -0,0 +1,2 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
exec /rails/script/admin/prepare-backup
|
||||||
Reference in new issue
Block a user