This repository has been archived by the owner on Nov 19, 2024. It is now read-only.
-
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.
Starting implementation of the setup method and revision images in th…
…e readme
- Loading branch information
Sven Speckmaier
committed
Jun 2, 2016
1 parent
d07f026
commit d72f11e
Showing
10 changed files
with
138 additions
and
3 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
File renamed without changes.
File renamed without changes.
File renamed without changes.
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 |
---|---|---|
@@ -0,0 +1,69 @@ | ||
#!/bin/bash | ||
|
||
# | ||
# Setup | ||
# | ||
# Initialize an app for use with rancherize | ||
# | ||
|
||
# | ||
# collect_data | ||
# | ||
# Ask the user for all necesasry information | ||
# | ||
function collect_data { | ||
echo "PROJECT_NAME" | ||
echo | ||
echo "The project name is used by docker-compose to identify Containers." | ||
echo "So if projectA and projectB both have a mysql container named" | ||
echo "MySQL and share the same PROJECT_NAME then docker-compose will try" | ||
echo "to reuse the already created container which leads to problems" | ||
read -e -p "PROJECT_NAME: " PROJECT_NAME | ||
|
||
echo "" | ||
echo "DOCKER_REPOSITORY_USER" | ||
echo "" | ||
echo "The user to which your docker image should be pushed to" | ||
read -e -p "DOCKER_REPOSITORY_USER: " DOCKER_REPOSITORY_USER | ||
|
||
echo "" | ||
echo "DOCKER_REPOSITORY_NAME" | ||
echo "" | ||
echo "The repository name to which your docker image should be pushed to" | ||
read -e -p "DOCKER_REPOSITORY_NAME: " DOCKER_REPOSITORY_NAME | ||
|
||
echo "" | ||
echo "RANCHER_SERVICE_NAME" | ||
echo "" | ||
echo "" | ||
read -e -p "RANCHER_SERVICE_NAME: " RANCHER_SERVICE_NAME | ||
} | ||
|
||
# | ||
# do_copy | ||
# | ||
# Create the files based on the users answers | ||
# | ||
function do_copy { | ||
|
||
if [ ! -d deploy ] ; then | ||
mkdir deploy | ||
fi | ||
|
||
sed \ | ||
-e "s/%DOCKER_REPOSITORY_USER%/$DOCKER_REPOSITORY_USER/g" \ | ||
-e "s/%DOCKER_REPOSITORY_NAME%/$DOCKER_REPOSITORY_NAME/g" \ | ||
-e "s/%PROJECT_NAME%/$PROJECT_NAME/g" \ | ||
$SCRIPTPATH/templates/config.cfg > deploy/config.cfg | ||
|
||
cp $SCRIPTPATH/templates/Dockerfile . | ||
} | ||
|
||
function setup { | ||
|
||
echo "=== Setup wizard ===" | ||
|
||
collect_data | ||
|
||
do_copy | ||
} |
File renamed without changes.
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,27 @@ | ||
# The docker-compose project name | ||
PROJECT_NAME=%PROJECT_NAME% | ||
|
||
|
||
# | ||
# Dockerhub Configuration | ||
# | ||
# The docker image will be published to | ||
# DOCKER_REPOSITORY_USER/DOCKER_REPOSITORY_NAME:PROJECT_PREFIX$VERSION | ||
# | ||
|
||
# The docker username to which the image should be published | ||
DOCKER_REPOSITORY_USER=%DOCKER_REPOSITORY_USER% | ||
|
||
# The docker | ||
DOCKER_REPOSITORY_NAME=%DOCKER_REPOSITORY_NAME% | ||
|
||
# The docker tag prefix. Will be added in front of all docker tags when building | ||
# or commiting | ||
PROJECT_PREFIX=%DOCKER_TAG_PREFIX% | ||
|
||
# | ||
# Rancher Configuration | ||
# | ||
|
||
# The rancher service name to use. Will be suffixed by -VERSION | ||
SERVICE_NAME=%RANCHER_SERVICE_NAME% |
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,7 @@ | ||
FROM busybox | ||
ADD . /var/www/laravel | ||
VOLUME /var/www/laravel | ||
ADD nginx-conf/laravel.conf.tpl /etc/nginx/conf.template.d/ | ||
VOLUME /etc/nginx/conf.template.d | ||
RUN sh -c 'if [ -f "/var/www/laravel/docker-prepare.sh" ] ; then sh /var/www/laravel/docker-prepare.sh ; fi' | ||
CMD /bin/dc |
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,27 @@ | ||
# The docker-compose project name | ||
PROJECT_NAME=testproject | ||
|
||
|
||
# | ||
# Dockerhub Configuration | ||
# | ||
# The docker image will be published to | ||
# DOCKER_REPOSITORY_USER/DOCKER_REPOSITORY_NAME:PROJECT_PREFIX$VERSION | ||
# | ||
|
||
# The docker username to which the image should be published | ||
DOCKER_REPOSITORY_USER=ipunkt | ||
|
||
# The docker | ||
DOCKER_REPOSITORY_NAME=%DOCKER_REPOSITORY_NAME% | ||
|
||
# The docker tag prefix. Will be added in front of all docker tags when building | ||
# or commiting | ||
PROJECT_PREFIX=%DOCKER_TAG_PREFIX% | ||
|
||
# | ||
# Rancher Configuration | ||
# | ||
|
||
# The rancher service name to use. Will be suffixed by -VERSION | ||
SERVICE_NAME=%RANCHER_SERVICE_NAME% |