from fabricio import tasks from fabricio.apps.db.postgres import StreamingReplicatedPostgresqlContainer from fabricio.misc import AvailableVagrantHosts db = tasks.DockerTasks( service=StreamingReplicatedPostgresqlContainer( name='postgres', image='postgres:10-alpine', pg_data='/data', pg_recovery_master_promotion_enabled=True, sudo=True, options=dict( volume='/data:/data', env='PGDATA=/data', publish='5432:5432', ), ), hosts=AvailableVagrantHosts(guest_network_interface='eth1'), destroy_command=True, )
def vagrant(): fab.env.update(roledefs={ 'web': AvailableVagrantHosts(), }, )
from fabricio import tasks, docker from fabricio.misc import AvailableVagrantHosts my_nginx = tasks.ImageBuildDockerTasks( service=docker.Container( name='my_nginx', image='my_nginx', options=dict(publish='80:80', ), ), hosts=AvailableVagrantHosts(), registry='localhost:5000', ssh_tunnel_port=5000, )