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
#!/bin/bash | |
#run dep | |
if [ ! -f "Gopkg.toml" ]; then | |
echo "running go dep" | |
go get -u github.com/golang/dep/cmd/dep | |
dep init | |
dep ensure | |
fi |
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
#!/bin/bash | |
PROJECT_NAME=dokku-django | |
VIRTUAL_ENV_PATH=venv | |
#install dependencies and add to requirements.txt | |
source $VIRTUAL_ENV_PATH/bin/activate | |
pip install gunicorn | |
pip install django-heroku |
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
#!/bin/bash | |
#create .static empty file | |
touch .static | |
# create deploy script | |
echo " | |
#!/bin/bash | |
rm -rf dist/* | |
npm run build |
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
#static.json on root project: | |
{ | |
"root": "public/", | |
"headers": { | |
"/**": { | |
"Cache-Control": "public, max-age=0, must-revalidate" | |
}, | |
"/**.css": { | |
"Cache-Control": "public, max-age=31536000, immutable" | |
}, |
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
#!/bin/bash | |
echo "-- STOPPING CONTAINERS" | |
docker stop $(docker ps -q) | |
echo "-- REMOVING CONTAINERS" | |
docker rm $(docker ps -q) | |
docker rm $(docker ps -a -q) | |
echo "-- REMOVING IMAGES" |
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
stages: | |
- deploy | |
variables: | |
APP_NAME: app-name | |
GIT_DEPTH: 0 | |
deploy: | |
stage: deploy | |
image: ilyasemenov/gitlab-ci-git-push |
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
stages: | |
- build | |
- deploy | |
variables: | |
APP_NAME: upcoming-movies | |
GIT_DEPTH: 0 | |
BUCKET_NAME: upcomingmovies | |
AWS_ACCESS_KEY_ID: ${AWS_ACCESS_KEY_ID} | |
AWS_SECRET_ACCESS_KEY: ${AWS_SECRET_ACCESS_KEY} |
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
package main | |
import ( | |
"fmt" | |
"time" | |
) | |
func measureTime(funcName string) func() { | |
start := time.Now() |
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
package main | |
import ( | |
"archive/zip" | |
"fmt" | |
"io/ioutil" | |
"os" | |
) | |
func main() { |
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
#!/bin/bash | |
# Delete all local branches that are no "master" neither "develop" | |
git branch -D `git branch | grep -vE 'master|develop'` |
OlderNewer