Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Add Dockerfile and compose file #813

Merged

Conversation

zmariscal
Copy link
Contributor

Purpose

Make it easier for people to develop using Docker.

Implementation

Add a Dockerfile and docker-compose.yml to help developers be able to pull an image and run the application locally. You can read the README for how to do this. I went for the most minimal change to get mysql working first.

Potential future work

The next step would be to add postgresql as a service so someone can run the tests against that database service.

to have things work out of the box we need this small tweak so
the host points to a future docker compose file
change where the host will be called 'mysql'
@zmariscal zmariscal marked this pull request as ready for review September 3, 2023 02:41
- .:/usr/src/app
depends_on:
- mysql
command: tail -f /dev/null
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There may be a better command to use here. It's just the simplest thing I could think of to ensure the container doesn't exit.


# Install system packages
RUN apt-get update -qq && \
apt-get install -y default-mysql-client vim && \
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding vim isn't necessary, but it sure makes things easier to debug in container

@jkowens
Copy link
Collaborator

jkowens commented Sep 4, 2023

Thanks @zmariscal this is a great idea!

@jkowens jkowens merged commit 02838d1 into zdennis:master Sep 4, 2023
14 checks passed
@zmariscal zmariscal deleted the feature--add-dockerfile-and-compose-file branch September 4, 2023 13:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants