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
#!/usr/bin/env python | |
import subprocess | |
import sys | |
def run_tests(): | |
result = subprocess.run( | |
['pytest'], stdout=subprocess.PIPE, stderr=subprocess.PIPE) | |
return result.returncode |
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
CREATE DATABASE company_db; | |
USE company_db; | |
-- CREATE TABLES | |
CREATE TABLE employee( | |
emp_id INT PRIMARY KEY, | |
first_name VARCHAR(20), | |
last_name VARCHAR(20), | |
birth_date DATE, | |
sex VARCHAR(1), | |
salary INT, |
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: 0.0 | |
os: linux | |
hooks: | |
ApplciationStop: | |
- location: scripts/stop_container.sh | |
timeout: 300 | |
runas: root | |
AfterInstall: | |
- location: scripts/start_container.sh |
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: 0.2 | |
env: | |
parameter-store: | |
DOCKER_REGISTRY_USERNAME: /myapp/docker-credentials/username | |
DOCKER_REGISTRY_PASSWORD: /myapp/docker-credentials/password | |
DOCKER_REGISTRY_URL: /myapp/docker-registry/url | |
phases: | |
install: |
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
# a simple Dockerfile to create a container for a flask app | |
FROM python:3.8 | |
WORKDIR /app | |
COPY requirements.txt . | |
RUN pip install -r requirements.txt | |
COPY . . |
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
#!/usr/bin/env python | |
# | |
# No Rights Reserved | |
# http://creativecommons.org/publicdomain/zero/1.0/ | |
"""Git post-receive hook script | |
Suggested project structure:: | |
/home/$_USER/ | |
env/ |