Skip to content

Commit

Permalink
add mysql to Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
yennanliu committed Nov 1, 2023
1 parent f716de7 commit b4b9382
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions springWarehouse/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,16 @@ WORKDIR /app
# Copy the compiled JAR file from the builder stage into the container
COPY --from=builder /usr/src/app/target/springWarehouse-0.0.1-SNAPSHOT.jar /app/springWarehouse.jar

# Install MySQL client for connecting to the MySQL server
RUN apt-get update && apt-get install -y mysql-client

# Define environment variables for MySQL connection
#ENV MYSQL_HOST=your-mysql-host
ENV MYSQL_PORT=3306
ENV MYSQL_DATABASE=warehouse_system
ENV MYSQL_USER=root
ENV MYSQL_PASSWORD=

# Expose port 7777 for the Spring Boot application
EXPOSE 7777

Expand Down

0 comments on commit b4b9382

Please sign in to comment.