Template
1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo synced 2024-11-28 12:46:09 +01:00

Allow the user to config the apt source in build.sh

This commit is contained in:
crystaldust 2014-04-15 23:48:33 -04:00
parent bb84bb8ac3
commit 066d91e113

View file

@ -1,6 +1,10 @@
# Configs of the docker images, you might have specify your own configs here. # Configs of the docker images, you might have specify your own configs here.
# type of database, support 'mysql' and 'postgres' # type of database, support 'mysql' and 'postgres'
DB_TYPE="postgres" DB_TYPE="postgres"
# apt source, you can select 'nchc' or 'aliyun' according to your network.
APT_SOURCE="nchc"
DB_PASSWORD="YOUR_DB_PASSWORD" DB_PASSWORD="YOUR_DB_PASSWORD"
DB_RUN_NAME="YOUR_DB_RUN_NAME" DB_RUN_NAME="YOUR_DB_RUN_NAME"
HOST_PORT="YOUR_HOST_PORT" HOST_PORT="YOUR_HOST_PORT"
@ -9,6 +13,8 @@ HOST_PORT="YOUR_HOST_PORT"
sed -i "s/THE_DB_PASSWORD/$DB_PASSWORD/g" images/$DB_TYPE/Dockerfile sed -i "s/THE_DB_PASSWORD/$DB_PASSWORD/g" images/$DB_TYPE/Dockerfile
# Replace the database root password in gogits image deploy.sh file. # Replace the database root password in gogits image deploy.sh file.
sed -i "s/THE_DB_PASSWORD/$DB_PASSWORD/g" images/gogits/deploy.sh sed -i "s/THE_DB_PASSWORD/$DB_PASSWORD/g" images/gogits/deploy.sh
# Replace the apt source in gogits image Dockerfile.
sed -i "s/#$APT_SOURCE#//g" images/gogits/Dockerfile
# Replace the database type in gogits image deploy.sh file. # Replace the database type in gogits image deploy.sh file.
sed -i "s/THE_DB_TYPE/$DB_TYPE/g" images/gogits/deploy.sh sed -i "s/THE_DB_TYPE/$DB_TYPE/g" images/gogits/deploy.sh