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

Create docker-compose.yml to one click start up. #739

Merged
merged 1 commit into from
Aug 2, 2023

Conversation

Anduin2017
Copy link
Collaborator

@Anduin2017 Anduin2017 commented Aug 2, 2023

This is a docker-compose file that defines two services, db and web.

The db service is based on the mariadb image and sets environment variables for the root password, database name, user name, and password. It also maps the container's port 3306 to the host's port 3306.

The web service builds an image from the current directory (.) and sets environment variables for the connection string to the database and the database type. It maps the container's port 80 to the host's port 8080 and depends on the db service. It also defines a healthcheck that tests the availability of the web server every 30 seconds.

This docker-compose file can be used to deploy a web application that uses a MySQL database.

@EdiWang EdiWang merged commit 88519f8 into master Aug 2, 2023
2 checks passed
@EdiWang EdiWang deleted the Anduin2017-patch-1 branch August 2, 2023 10:45
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