Skip to content
Snippets Groups Projects
Commit ebae8d38 authored by Johannes Buechele's avatar Johannes Buechele
Browse files

fixed ipfs, added ssh tunnel

parent 25ccda65
No related branches found
No related tags found
No related merge requests found
......@@ -4,6 +4,13 @@ COPY ./faircommons-services .
RUN mvn clean package
FROM sapmachine:21-jre-headless-ubuntu
# Install SSH client
RUN apt-get update && apt-get install -y openssh-client && rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY ./deployments/scripts/setup-ssh-tunnel.sh ./setup-ssh-tunnel.sh
RUN chmod +x ./setup-ssh-tunnel.sh
COPY --from=builder /app/ipfs-service/target/ipfs-service*.jar ./ipfs-service.jar
ENTRYPOINT ["java","-jar","./ipfs-service.jar"]
\ No newline at end of file
#!/bin/bash
SSH_KEY_PATH=/root/.ssh/ssh-privatekey
REMOTE_USER=ipfs
REMOTE_HOST=157.90.125.62
LOCAL_PORT=9094
REMOTE_PORT=9094
SSH_PORT=3345
ssh -i $SSH_KEY_PATH -f -N -L $LOCAL_PORT:localhost:$REMOTE_PORT $REMOTE_USER@$REMOTE_HOST -p $SSH_PORT &
......@@ -22,7 +22,7 @@ import java.util.Objects;
@ConditionalOnProperty(prefix = "ipfs", name = "service", havingValue = "cluster")
public class IpfsClusterService implements IpfsService {
private static final Logger logger = LoggerFactory.getLogger(IpfsClusterService.class);
private static final String UPLOAD_ENDPOINT = "/add?pin=true";
private static final String UPLOAD_ENDPOINT = "/add?local=true&pin=true";
private final RestTemplate restTemplate;
public IpfsClusterService(RestTemplateBuilder restTemplateBuilder,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment