Beautiful Open-Source Form Builder
Add build context to compose (#680)
Daniel Ekmanae74f33a2753
diff --git a/docker-compose.yml b/docker-compose.ymlindex 9e694a9c4..6d028617a 100644--- a/docker-compose.yml+++ b/docker-compose.yml@@ -2,6 +2,9 @@services:api: &apiimage: jhumanj/opnform-api:latest+ build:+ context: .+ dockerfile: docker/Dockerfile.apienvironment: &api-environment # Add this anchorDB_HOST: dbREDIS_HOST: redis@@ -18,6 +21,9 @@ services:api-worker:image: jhumanj/opnform-api:latest+ build:+ context: .+ dockerfile: docker/Dockerfile.apicommand: php artisan queue:workenvironment:<<: *api-environment@@ -29,6 +35,9 @@ services:ui:image: jhumanj/opnform-client:latest+ build:+ context: .+ dockerfile: docker/Dockerfile.clientenv_file:- ./client/.envdiff --git a/docs/deployment/docker.mdx b/docs/deployment/docker.mdxindex 288afa3f9..d90de9cd8 100644--- a/docs/deployment/docker.mdx+++ b/docs/deployment/docker.mdx@@ -67,7 +67,25 @@ We recommend using these official images for your OpnForm deployment.## Building Your Own Docker Images-If you prefer to build your own Docker images, you can do so using the provided Dockerfiles in the repository:+By default, OpnForm uses pre-built images from Docker Hub. However, if you want to build the images yourself (for development or customization), you have two options:++### Option 1: Using Docker Compose (Recommended)++The simplest way to build the images is using Docker Compose:++```bash+docker compose build+```++This will build all the necessary images. You can then start the application as usual:++```bash+docker compose up -d+```++### Option 2: Building Images Manually++You can also build the images manually using the provided Dockerfiles:1. Build the API image:```bash@@ -79,6 +97,8 @@ If you prefer to build your own Docker images, you can do so using the provideddocker build -t opnform-ui:local -f docker/Dockerfile.client .```+If you build the images manually, make sure to update your docker-compose.override.yml to use these local images (see below).+### Overriding Docker Compose ConfigurationYou can override the default Docker Compose configuration by creating a `docker-compose.override.yml` file. This allows you to customize various aspects of the deployment without modifying the main `docker-compose.yml` file.