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
| [Unit] | |
| Description=Redis In-Memory Data Store | |
| After=network.target | |
| [Service] | |
| User=redis | |
| Group=redis | |
| ExecStart=/usr/local/bin/redis-server /etc/redis/redis.conf | |
| ExecStop=/usr/local/bin/redis-cli shutdown | |
| Restart=always |
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
| echo "deb http://dl.google.com/linux/chrome/deb/ stable main" | sudo tee -a /etc/apt/sources.list | |
| wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add - | |
| sudo apt-get update | |
| sudo apt-get install -y libxpm4 libxrender1 libgtk2.0-0 libnss3 libgconf-2-4 | |
| sudo apt-get install -y google-chrome-stable | |
| sudo apt-get install -y xvfb gtk2-engines-pixbuf | |
| sudo apt-get install -y xfonts-cyrillic xfonts-100dpi xfonts-75dpi xfonts-base xfonts-scalable | |
| sudo apt-get install -y imagemagick x11-apps | |
| Xvfb -ac :99 -screen 0 1280x1024x16 & | |
| disown $1 |
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
| # list all container ID's | |
| docker ps -aq | |
| # stop running containers | |
| docker stop $(docker ps -aq) | |
| # remove all containers | |
| docker rm $(docker ps -aq) | |
| # remove all images |
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
| # Assumes the database container is named 'db' | |
| DOCKER_DB_NAME="$(docker-compose ps -q db)" | |
| DB_HOSTNAME=db | |
| DB_USER=postgres | |
| LOCAL_DUMP_PATH="path/to/local.dump" | |
| docker-compose up -d db | |
| docker exec -i "${DOCKER_DB_NAME}" pg_restore -C --clean --no-acl --no-owner -U "${DB_USER}" -d "${DB_HOSTNAME}" < "${LOCAL_DUMP_PATH}" | |
| docker-compose stop db |
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
| # Assumes the database container is named 'db' | |
| DOCKER_DB_NAME="$(docker-compose ps -q db)" | |
| DB_HOSTNAME=db | |
| DB_USER=postgres | |
| LOCAL_DUMP_PATH="path/to/local.dump" | |
| docker-compose up -d db | |
| docker exec -i "${DOCKER_DB_NAME}" pg_restore -C --clean --no-acl --no-owner -U "${DB_USER}" -d "${DB_HOSTNAME}" < "${LOCAL_DUMP_PATH}" | |
| docker-compose stop db |
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 | |
| setUp(){ | |
| sudo apt-get update | |
| sudo apt-get install python3 python3-pip postgresql postgresql-contrib nginx virtualenv supervisor | |
| } | |
| setUpEnvironment(){ | |
| mkdir ~/cp3 | |
| cd ~/cp3 | |
| virtualenv --python=python3 venv |
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
| [program:yummy_api] | |
| command =bash -c "/home/ubuntu/start.bash" | |
| user =root | |
| stdout_logfile =/home/ubuntu/logs/gunicorn_supervisor.log | |
| redirect_stderr =true | |
| environment=LANG=en_US.UTF-8,LC_ALL=en_US.UTF-8 |
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 | |
| sudo apt-get update | |
| sudo apt-get install python3 python3-pip postgresql postgresql-contrib nginx virtualenv | |
| mkdir ~/cp3 | |
| cd ~/cp3 | |
| virtualenv --python=python3 venv | |
| git clone https://github.com/code-sleuth/yummy-recipes-api.git yummy-api | |
| cd yummy-api | |
| touch .env |
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 | |
| sudo apt-get update | |
| sudo apt-get install python3 python3-pip postgresql postgresql-contrib nginx virtualenv | |
| mkdir ~/cp3 | |
| cd ~/cp3 | |
| virtualenv --python=python3 venv | |
| git clone https://github.com/code-sleuth/yummy-recipes-api.git yummy-api | |
| cd yummy-api | |
| touch .env |