Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Cant get this to work #93

Open
Motophan opened this issue Nov 7, 2023 · 3 comments
Open

Cant get this to work #93

Motophan opened this issue Nov 7, 2023 · 3 comments

Comments

@Motophan
Copy link

Motophan commented Nov 7, 2023

[gentoo@old ~]$ docker logs lotus

===> ENV Variables ...
INFRA_IMPORT_SNAPSHOT="true"
INFRA_LOTUS_DAEMON="true"
INFRA_LOTUS_GATEWAY="true"
INFRA_SYNC="true"
===> Configuring ...
INFRA_LOTUS_HOME is empty
===> ENV Variables ...
INFRA_IMPORT_SNAPSHOT="true"
INFRA_LOTUS_DAEMON="true"
INFRA_LOTUS_GATEWAY="true"
INFRA_SYNC="true"
===> Configuring ...
INFRA_LOTUS_HOME is empty
===> ENV Variables ...
INFRA_IMPORT_SNAPSHOT="true"
INFRA_LOTUS_DAEMON="true"
INFRA_LOTUS_GATEWAY="true"
INFRA_SYNC="true"
===> Configuring ...
INFRA_LOTUS_HOME is empty
version: "2.1"
networks:
  default:
    driver: bridge
    ipfs:
          image: ipfs/kubo:latest
          container_name: ipfs
          environment:
            - IPFS_PROFILE=server
            - IPFS_PATH=/ipfsdata
          volumes:
            - /home/gentoo/docker/ipfs:/ipfsdata
          ports:
            - 4001:4001
            - 127.0.0.1:8080:8080
            - 127.0.0.1:8081:8081
            - 127.0.0.1:5001:5001
    lotus:
          image: glif/lotus:v1.23.3-gw-mainnet-amd64
          env_file:
              - .env
          user: lotus_user
          container_name: lotus
          volumes:
            - $HOME/docker/lotus:/home/lotus_user
          ports:
            - 127.0.0.1:1234:1234
            - 127.0.0.1:1235:1235
          environment:
            - INFRA_SYNC="true"
            - INFRA_IMPORT_SNAPSHOT="true"
            - INFRA_LOTUS_DAEMON="true"
            - INFRA_LOTUS_GATEWAY="true"

Shouldnt this just work?
I need to run a lotus node, a posgres db, a ipfs node, and

@ArseniiPetrovich
Copy link
Member

What is the content of your .env file? Are you using the default one? Is it located in the path specified in your docker-compose (.env)?

@Motophan
Copy link
Author

Motophan commented Nov 9, 2023

[gentoo@old ~]$ cat docker/.env
INFRA_CLEAR_RESTART=false
INFRA_IMPORT_SNAPSHOT=true
INFRA_LOTUS_DAEMON=true
INFRA_LOTUS_GATEWAY=true
INFRA_PERSISTNODEID=false
INFRA_SECRETVOLUME=false
INFRA_SYNC=true
SNAPSHOTURL=https://snapshots.mainnet.filops.net/minimal/latest.zst
INFRA_LOTUS_HOME=/home/lotus_user
[gentoo@old ~]$

@dumikau
Copy link
Contributor

dumikau commented Nov 14, 2023

Hello there! :)

So, the number of variables that's being printed at the beginning of your log doesn't match the number of variables in the .env file. I can assume that's a variable precedence issue where the variables specified in the environment section replace the variables from the env file altogether. And INFRA_LOTUS_HOME is a required variable, so without it being set our scripts simply exit.

I would advise to choose between setting variables via the env file OR the environment section to avoid variable precedence issues in the future.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants