-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Registry is running in docker container
- Loading branch information
1 parent
c635026
commit 0394d7d
Showing
8 changed files
with
91 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
APT_ENV="dev_docker" | ||
DB_DRIVER="postgres" | ||
DB_HOST="postgres_docker_local" | ||
DB_NAME="apt_registry_development" | ||
DB_USER="dev_user" | ||
DB_PASSWORD="password" | ||
DB_PORT=5432 | ||
DB_USE_SSL=false | ||
COOKIE_HASH_KEY='y0b6|UBJQ(N$KB)jAJYL-aj=:q?;yK64^TPch0=|1XNnv{X@QrL#?80u$1]LcBF' | ||
COOKIE_BLOCK_KEY='4Qdnm4acxfAILGEFQ3jUj0PoLbMWbyMm' | ||
COOKIE_DOMAIN="localhost" | ||
SESSION_MAX_AGE=43200 | ||
SESSION_COOKIE_NAME="aptrust_session" | ||
FLASH_COOKIE_NAME="aptrust_flash" | ||
PREFS_COOKIE_NAME="aptrust_prefs" | ||
HTTPS_COOKIES=false | ||
NSQ_URL='http://localhost:4151' | ||
BATCH_DELETION_KEY="00000000-0000-0000-0000-000000000000" | ||
EMAIL_SERVICE_TYPE="SMTP" | ||
MAINTENANCE_MODE=false | ||
ENABLE_TWO_FACTOR_SMS=false | ||
SNS_ENDPOINT="" | ||
AWS_SNS_USER="" | ||
AWS_SNS_PWD="" | ||
ENABLE_TWO_FACTOR_AUTHY=false | ||
OTP_EXPIRATION="15m" | ||
EMAIL_ENABLED=false | ||
EMAIL_FROM_ADDRESS="[email protected]" | ||
REDIS_DEFAULT_DB=0 | ||
REDIS_PASSWORD="" | ||
REDIS_URL="localhost:6379" | ||
RETENTION_MINIMUM_GLACIER=90 | ||
RETENTION_MINIMUM_GLACIER_DEEP=180 | ||
RETENTION_MINIMUM_WASABI=90 | ||
RETENTION_MINIMUM_STANDARD=0 | ||
LOG_FILE="~/tmp/logs/registry_dev.log" | ||
LOG_LEVEL=0 | ||
LOG_CALLER=false | ||
LOG_TO_CONSOLE=true | ||
LOG_SQL=false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,25 @@ | ||
#!/bin/sh | ||
# Copy all executables from ./bin to /usr/local/bin | ||
cp ./bin/linux/nsqadmin /usr/local/bin/ | ||
cp ./bin/linux/nsqd /usr/local/bin/ | ||
cp ./bin/linux/nsqlookupd /usr/local/bin/ | ||
cp ./bin/linux/redis-cli /usr/local/bin/ | ||
cp ./bin/linux/redis-server /usr/local/bin/ | ||
# cp ./bin/linux/nsqadmin /usr/local/bin/ | ||
# cp ./bin/linux/nsqd /usr/local/bin/ | ||
# cp ./bin/linux/nsqlookupd /usr/local/bin/ | ||
# cp ./bin/linux/redis-cli /usr/local/bin/ | ||
# cp ./bin/linux/redis-server /usr/local/bin/ | ||
|
||
# Wait for Postgres to be ready | ||
until PGPASSWORD=$DB_PASSWORD pg_isready -h $DB_HOST -p $DB_PORT -U $DB_USER; do | ||
echo "Waiting for Postgres..." | ||
sleep 2 | ||
done | ||
|
||
# Run schema and migration files | ||
echo "Running schema.sql" | ||
PGPASSWORD=$DB_PASSWORD psql -h $DB_HOST -p $DB_PORT -U $DB_USER -d $DB_NAME -f /docker-entrypoint-initdb.d/schema.sql | ||
for file in /docker-entrypoint-initdb.d/migrations/*.sql; do | ||
echo "Running migration $file" | ||
PGPASSWORD=$DB_PASSWORD psql -h $DB_HOST -p $DB_PORT -U $DB_USER -d $DB_NAME -f "$file" | ||
done | ||
|
||
# Execute the original command | ||
exec "$@" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters