Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Request: Docker deploy #26

Open
dillfrescott opened this issue Dec 24, 2024 · 13 comments
Open

Request: Docker deploy #26

dillfrescott opened this issue Dec 24, 2024 · 13 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@dillfrescott
Copy link

A ready to go docker container would be nice. Preferably with an .env file to enter the keys and variables. I would appreciate this if it was added :)

@Crossoufire Crossoufire self-assigned this Dec 25, 2024
@Crossoufire Crossoufire added enhancement New feature or request help wanted Extra attention is needed labels Dec 25, 2024
@Crossoufire Crossoufire removed their assignment Dec 25, 2024
@vwency
Copy link

vwency commented Dec 25, 2024

Did you mean deploying frontend and backend Docker images to Docker Hub?

@vwency
Copy link

vwency commented Dec 25, 2024

If you need help setting up or improving your GitHub workflows for deployment, i can do this

@dillfrescott
Copy link
Author

Oh sorry I meant like premade containers for the project to make it easier to deploy.

@vwency
Copy link

vwency commented Dec 25, 2024

  • docker-compose.yml (root dir)

services:
  frontend:
    build:
      context: ./frontend
      dockerfile: Dockerfile
    volumes:
      - ./build:/app/build
    ports:
      - "3000:3000"
    networks:
      my_network:
        ipv4_address: 192.168.1.2
      
networks:
  my_network:
    driver: bridge
    ipam:
      config:
        - subnet: "192.168.1.0/24" 

/front

  • Dockerfile
FROM node:alpine AS build
WORKDIR /app


COPY package*.json ./
RUN npm install
COPY . .
RUN npm run build


WORKDIR /app/build

@vwency
Copy link

vwency commented Dec 27, 2024

When i try build front-end via npm i got blank page it's correctly?

@Crossoufire
Copy link
Owner

Do you have any errors in the browser console ?

@vwency
Copy link

vwency commented Dec 27, 2024

Uncaught SyntaxError: The requested module 
'/node_modules/.vite/deps/react-icons_lu.js?v=043c0d89' 
does not provide an export named 'LuLoader2' (at SearchBar.jsx:8:9)

Do you have any errors in the browser console ?

@Crossoufire
Copy link
Owner

Ok these are errors related to react-icons. They changed the names of some Lucide icons. I have changed that in the dev versions.

  • You can either try to downgrade the react icons package (don't know if this would work)
  • Manually change the names of the faulty icons
  • Wait for the dev versions to be merged with the main (I'm currently working to add the manga as a list, so it could take some time)

@mabezi
Copy link

mabezi commented Jan 2, 2025

  • You can either try to downgrade the react icons package (don't know if this would work)

5.3.0 works. (I have tested it.)

@mabezi
Copy link

mabezi commented Jan 2, 2025

I managed to get the software running in a dockerized environment. But honestly, it was a lot of effort.

I could help out if needed, but first there's something else for me to sort out:
Is the version on GitHub really production ready?

I had to make adjustments that definitely had nothing to do with Docker.

And the README is missing some information, for example that Poetry >=1.8 is required or that you need redis based on default values in config.py.

@Crossoufire
Copy link
Owner

Thanks for the feedback and for running it in Dockerized environment.

The main branch on GitHub is not really production-ready. This is an active, solo project, and I do changes quite frequently. I would like it to be more stable and polished, but this is still work in progress.

I have updated the README to include the requirement for Poetry.
The Redis is also mentioned in the config.py under the Flask-Caching section:

# Flask-Caching
CACHE_TYPE = os.environ.get("CACHE_TYPE") or "RedisCache"
CACHE_REDIS_HOST = os.environ.get("CACHE_REDIS_HOST") or "localhost"
CACHE_REDIS_PORT = int(os.environ.get("CACHE_REDIS_PORT") or "6379")
CACHE_REDIS_DB = int(os.environ.get("CACHE_REDIS_DB") or "0")
CACHE_KEY_PREFIX = os.environ.get("CACHE_KEY_PREFIX") or "mylists_cache_"

If you are interested in contributing, your help is most welcome.

@mabezi
Copy link

mabezi commented Jan 2, 2025

Of course I didn't mean that in a bad way, I was just quite irritated.

For example, I couldn't start the backend without modifying it:

Traceback (most recent call last):
  File "/home/MyLists/backend/server.py", line 1, in <module>
    from backend.api import create_app
ModuleNotFoundError: No module named 'backend'

But I guess this is quite off topic.

@loxoron218
Copy link

I would love to see this as a Docker!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

5 participants