To resolve the application error we currently have when running the release image, we need to run a database that the application can connect to, and ensure the application is configured to use the database.
We can achieve this using Docker Compose by adding a new service called db, which is based on the official MySQL server container:
version: '2.4'services: test: build: context: . dockerfile: Dockerfile target: test release: build: context: . dockerfile: Dockerfile ports: - 8000:8000 command: - uwsgi - --http=0.0.0.0:8000 - --module=todobackend.wsgi - --master db: image: mysql:5.7 environment: MYSQL_DATABASE: todobackend MYSQL_USER: todo MYSQL_PASSWORD: password MYSQL_ROOT_PASSWORD: password ...