Skip to content

Using Symfony Docker with an existing MySQL database #426

@yourwebmaker

Description

@yourwebmaker

Hi,

First of all, thanks for this project. It saves a lot of time from us on setting up a docker env with SF.

I'm trying to adapt a small project that uses an old MySql 5.7 database and some libs that execute some queries that run only in MySQL.

After following the steps mentioned here https://github.com/dunglas/symfony-docker/blob/main/docs/existing-project.md it always end up with Postgres configuration in the Dockerfile, docker compose, env file, etc after the recipes step:

Here it is one from Dockerfile:

###> recipes ###
###> doctrine/doctrine-bundle ###
RUN apk add --no-cache --virtual .pgsql-deps postgresql-dev; \
	docker-php-ext-install -j"$(nproc)" pdo_pgsql; \
	apk add --no-cache --virtual .pgsql-rundeps so:libpq.so.5; \
	apk del .pgsql-deps
###< doctrine/doctrine-bundle ###
###< recipes ###

Will the composer docker plugin/recipe will always default to Postgres, no matter if I set the env variables to MySql?

I'm asking that before I start porting the whole project to Postgres.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions