Tag: docker wercker

configurationwercker.yml在需要postgres服务的python应用程序中运行unit testing

我正在尝试使用dockerized版本的wercker在python应用程序中运行unit testing,但大部分unit testing失败,并报错sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) could not connect to server: No route to host 。 Wercker文档缺乏configuration来build立这种连接。 也许我错过了简单的东西,但我不能让这个数据库连接运行我的testing后,花费比我应该有更多的时间。 无论如何,也有类似的问题的Rails应用程序,但答案不帮助,所以也许问题将帮助其他人与Python应用程序。 寻找这样的帮助! 以下是我目前的wercker.yml: # http://devcenter.wercker.com/docs/containers/index.html box: python:3.4.4-onbuild # You can also use services such as databases. Read more on our dev center: # http://devcenter.wercker.com/docs/services/index.html services: # http://devcenter.wercker.com/docs/services/postgresql.html – id: postgres:9.4 env: POSTGRES_PASSWORD: mylittlesecret POSTGRES_USER: postgres # optional # This […]

wercker.com连接到MySQL数据库

背景 我正在尝试使用http://wercker.com为Yii2应用程序构build一些自动化testing。 我创build了自己的Docker仓库https://hub.docker.com/r/consynki/yii2/ ,它提供了一个简单的LAMP堆栈。 我正在使用Docker仓库作为我的wercker.yml文件中的框,用几个简单的步骤来设置我的应用程序,初始化数据库,然后运行我的phpunittesting box: consynki/yii2 build: steps: – script: name: Update enviroment dependencies code: |- curl -sS https://getcomposer.org/installer | php — –install-dir=/usr/bin/ –filename=composer – script: name: Install Composer dependencies code: |- rm -rf ./vendor /usr/bin/composer install –no-interaction –prefer-source – script: name: Apache site install code: |- sudo chmod -R 755 /var/www sudo cp […]