marmelab / gaudi

Gaudi allows to share multi-component applications, based on Docker, Go, and YAML.
http://gaudi.io/
MIT License
563 stars 28 forks source link

mysql template #78

Closed amenophis closed 10 years ago

amenophis commented 10 years ago

Hi, It seems the mysql template does not let the container in running state after building. Can you take a look ?

.gaudi.yml

db:
    type: mysql
    ports:
        3306: 3306
    after_script: mysql -e "CREATE DATABASE mydb CHARACTER SET utf8 COLLATE utf8_general_ci;" -uroot
    volumes:
        .gaudi/mysql: /var/lib/mysql

Thanks

amenophis commented 10 years ago

Workaround here: #79

manuquentin commented 10 years ago

Can you give the result of docker logs db after starting all containers ?

I think a IF NOT EXISTS is missing in the after_script query, this cause an issue when the database already exists.