This file contains hidden or 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
| import time | |
| import redis | |
| from flask import Flask | |
| app = Flask(__name__) | |
| cache = redis.Redis(host='redis', port=6379) | |
| def get_hit_count(): |
This file contains hidden or 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 | |
| docker exec -it web "$@" |
This file contains hidden or 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
| version: '2' | |
| services: | |
| web: | |
| container_name: web | |
| image: esron/ubuntu-web-server | |
| volumes: | |
| - .:/home/project-folder | |
| ports: | |
| - '8000:80' |
This file contains hidden or 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
| version: '2' | |
| services: | |
| web: | |
| container_name: web | |
| build: . | |
| volumes: | |
| - .:/home/project-folder | |
| ports: | |
| - '8000:80' |
This file contains hidden or 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 | |
| update-alternatives --set php /usr/bin/php7.2 | |
| a2enmod php7.2 | |
| service apache2 restart | |
| apachelinker /home/project-folder/public | |
| tail -f /tmp/dev.log |
This file contains hidden or 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
| <VirtualHost *:80> | |
| ServerName dev.app | |
| ServerAlias www.dev.app | |
| ServerAdmin webmaster@localhost | |
| DocumentRoot /var/www/dev | |
| <Directory /> | |
| Options -Indexes +FollowSymLinks +MultiViews +Includes | |
| AllowOverride AuthConfig |
This file contains hidden or 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 | |
| PUBLIC_FOLDER=$1 | |
| ln -sfn $1 /var/www/dev | |
| service apache2 start |
This file contains hidden or 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
| FROM ubuntu:16.04 | |
| LABEL Author="Esron Silva esron.silva@sysvale.com" | |
| ENV PATH ${PATH}:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin | |
| RUN apt-get update && apt-get upgrade -y | |
| RUN apt-get install -y software-properties-common \ | |
| apache2 \ |
This file contains hidden or 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
| <VirtualHost *:80> | |
| ServerName dev.app | |
| ServerAlias www.dev.app | |
| ServerAdmin webmaster@localhost | |
| DocumentRoot /var/www/dev | |
| <Directory /> | |
| Options -Indexes +FollowSymLinks +MultiViews +Includes | |
| AllowOverride AuthConfig |
This file contains hidden or 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 | |
| if [ $# -eq 0 ]; then | |
| /usr/games/fortune | /usr/games/cowsay | |
| else | |
| /usr/games/cowsay "$@" | |
| fi |