Add custom Dockerfile for Docker Compose setup
Browse files- Dockerfile +20 -0
Dockerfile
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Use an official Docker image as a base
|
| 2 |
+
FROM docker:latest
|
| 3 |
+
|
| 4 |
+
# Install Docker Compose
|
| 5 |
+
RUN apk add --no-cache docker-compose
|
| 6 |
+
|
| 7 |
+
# Set the working directory
|
| 8 |
+
WORKDIR /app
|
| 9 |
+
|
| 10 |
+
# Copy the entire project into the container
|
| 11 |
+
COPY . .
|
| 12 |
+
|
| 13 |
+
# Change to the dify/docker directory
|
| 14 |
+
WORKDIR /app/dify/docker
|
| 15 |
+
|
| 16 |
+
# Copy the example environment file from the correct location
|
| 17 |
+
RUN cp /app/dify/docker/.env.example .env
|
| 18 |
+
|
| 19 |
+
# Run Docker Compose to build and start the services
|
| 20 |
+
CMD ["docker-compose", "up", "-d"]
|