Beispiel #1
0
def sync(args=[]):
    if 0 != os.system(
            env.docker_compose_env(
                env.run(
                    ['%s && %s' %
                     (COMMAND_DEPENDENCES, COMMAND_DB_MIGRATE)]))):
        config_info()
Beispiel #2
0
def rails_new(args=[]):
    if 0 == os.system(
            env.docker_compose_env(
                env.run([
                    'gem install rails && rails new . -d postgresql --webpack=vue'
                ]))):
        print(env.line_seperator('=', 80))
        print("\n            INSTALL FINISH\n")
        config_info()
        show_hint()
Beispiel #3
0
def migrate(args=[]):
    os.system(env.docker_compose_env(env.run(['%s' % (COMMAND_DB_MIGRATE)])))
Beispiel #4
0
def prepare(args=[]):
    os.system(
        env.docker_compose_env(
            env.run(['%s && %s' % (COMMAND_DEPENDENCES, COMMAND_PREPARE)],
                    run_args='--no-deps')))
Beispiel #5
0
def rails_publish(args=[]):
    prepare()
    os.system(env.docker_compose_env(env.down()))
    migrate()
    os.system(env.docker_compose_env(env.up()))
Beispiel #6
0
def rails_reset(args=[]):
    os.system(
        env.docker_compose_env(
            env.run(['%s && %s' % (COMMAND_DROP, COMMAND_DB_SEED)])))
Beispiel #7
0
def rails_drop(args=[]):
    os.system(env.docker_compose_env(env.run([COMMAND_DROP])))
Beispiel #8
0
def rails_c(args=[]):
    os.system(env.docker_compose_env(env.run(['rails c'])))