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
# -*- coding: utf-8 -*- | |
from django.db import models | |
class Person(models.Model): | |
name = models.CharField(max_length=128) | |
class Group(models.Model): | |
name = models.CharField(max_length=128) |
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
# -*- coding: utf-8 -*- | |
from django.db import models | |
class Person(models.Model): | |
name = models.CharField(max_length=128) | |
class Group(models.Model): | |
name = models.CharField(max_length=128) |
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
@task | |
def deploy(): | |
""" | |
Deploy the project. | |
""" | |
# check stage | |
require('stage', provided_by=(stage_api, stage_admin, | |
production_api, production_admin)) |
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
version: '2' | |
services: | |
postgres: | |
restart: always | |
image: postgres:9.4 | |
hostname: postgres | |
container_name: pg | |
ports: | |
- "5432:5432" |
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
node { | |
stage('Checkout') { | |
git branch: 'develop', url: 'GIT_URL', credentialsId: 'github' | |
gitCommit = sh(returnStdout: true, script: 'git rev-parse HEAD').trim() | |
} | |
stage('Docker "base" image pull') { | |
docker.withRegistry('https://123456789.dkr.ecr.ap-northeast-1.amazonaws.com', 'ecr:ap-northeast-1:aws-ecr') { | |
docker.image('123456789.dkr.ecr.ap-northeast-1.amazonaws.com/base:latest').pull() | |
} |
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
FROM base:latest | |
MAINTAINER Loup <[email protected]> | |
# project setting | |
RUN mkdir /home/release && \ | |
mkdir /home/release/code && \ | |
mkdir /home/release/conf && \ | |
mkdir /home/release/tmp | |
COPY . /home/release/code | |
RUN pip install -r /home/release/code/requirements.txt |
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
FROM base:latest | |
MAINTAINER Loup <[email protected]> | |
# project setting | |
RUN mkdir /home/release && \ | |
mkdir /home/release/code && \ | |
mkdir /home/release/conf && \ | |
mkdir /home/release/tmp | |
COPY . /home/release/code | |
RUN pip install -r /home/release/code/requirements.txt |
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
FROM ubuntu:16.04 | |
MAINTAINER Loup <[email protected]> | |
# Install pyenv | |
ENV PYENV_ROOT /root/.pyenv | |
ENV PATH /root/.pyenv/shims:/root/.pyenv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin | |
RUN apt-get update && \ | |
apt-get install -y git mercurial build-essential libssl-dev libbz2-dev libreadline-dev libsqlite3-dev curl vim && \ | |
curl -L https://raw.githubusercontent.com/yyuu/pyenv-installer/master/bin/pyenv-installer | bash |
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
fragment userAllFields on User { | |
id | |
name | |
age | |
gender | |
} | |
mutation { | |
updateUser(userData: {id: 1, name: "test2"}) { |
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
fragment userAllFields on User { | |
id | |
name | |
age | |
gender | |
} | |
mutation { | |
createUser(name: "test", age: 11, gender: FEMALE) { |
NewerOlder