упаковал всё в docker-compose
This commit is contained in:
9
lab3/consumer/Dockerfile
Normal file
9
lab3/consumer/Dockerfile
Normal file
@@ -0,0 +1,9 @@
|
||||
FROM gradle:8.13-jdk21
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN gradle build --no-daemon
|
||||
|
||||
CMD ["gradle", "run", "--no-daemon"]
|
||||
@@ -10,7 +10,7 @@ public class Recv {
|
||||
|
||||
public static void main(String[] argv) throws Exception {
|
||||
ConnectionFactory factory = new ConnectionFactory();
|
||||
factory.setHost("localhost");
|
||||
factory.setHost("rabbitmq");
|
||||
Connection connection = factory.newConnection();
|
||||
Channel channel = connection.createChannel();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user