Skip to content
This repository has been archived by the owner on Aug 26, 2024. It is now read-only.

add docker files #45

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open

add docker files #45

wants to merge 8 commits into from

Conversation

chris-tbd
Copy link
Contributor

This pull request primarily focuses on the introduction of Docker to the codebase. Docker is a tool that helps to create, deploy, and run applications by using containers. The changes include the creation of Docker-related files and configurations, as well as the addition of Docker-related scripts in the package.json file.

Docker-related changes:

  • .dockerignore: This file was created to specify files and directories that Docker should ignore when building the Docker image. It includes entries like node_modules, npm-debug.log, docker-compose.yml, .DS_Store, and .git.

  • Dockerfile: This file was added to define how to build a Docker image for the application. It specifies that the base image should be the official Node.js image, sets the working directory inside the container, copies necessary files, installs application dependencies, and downloads and installs dbmate.

  • docker-compose.yaml: This file was added to define and configure the application's services. It specifies the use of the latest version of the postgres image and the Node.js 20.4.0 image, sets environment variables, defines dependencies between services, and specifies commands to run.

  • .github/workflows/docker-image-publish.yml: This file was added to define a GitHub Actions workflow that builds and publishes a Docker image whenever there's a push or pull request to the main branch.

Changes to scripts:

  • package.json: Docker-related scripts were added, including docker:up to start the Docker containers, docker:down to stop the Docker containers, docker:logs to follow the logs of the Docker containers, and docker:build to build the Docker images.

Dockerfile Outdated Show resolved Hide resolved
docker-compose.yaml Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
Dockerfile Outdated Show resolved Hide resolved
Copy link
Member

@leordev leordev left a comment

Choose a reason for hiding this comment

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

Great addition by introducing Docker setup containerizing the application! That's the first step to deploy in our infra! 🎉

I added some comments for general adjusts to be made. But they are very small and this is great!

Something that I'd add to this PR are the instructions related to running locally with Docker in the README file.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants