Open INeedAUniqueUsername opened 2 years ago
I updated this a bit to change and add a few things.
I'll assign it to you! For Hacktoberfest, I tend to make one issue (or request one PR) per concept per language. You can make as many as you want, but I'll be happy if you do one PR per concept if you're participating.
So I got the project running on my local machine but none of my changes are showing up. I'm looking at localhost:8000 on incognito. I'm not sure what's happening here.
Hey @INeedAUniqueUsername, What is it saying or showing when you try to go there? Is it like "server can't be found", or "error with the server", or something else? If you're running the Docker image, is there an error? If you're running the Python app directly, is there an error reported there?
@geekygirlsarah The app starts up with no problems. But nothing happens if I modify the json files.
Hmm... to the best of my knowledge that should work. Have you tried restarting the Docker container? It should automatically pull in changes to the code and Python/Django should just rerender new stuff on new page visits, but just in case it's not going in for some reason you could try that.
Also are you running it directly (like a docker run -it code-thesaurus
) or are you using docker-compose up
? The docker-compose will automatically patch in the latest code changes without having to restart the container.
Or if you're running the container directly, you could try to add in like -v .:/code/
to make it automatically pull in changes.
@geekygirlsarah
I'm running the container with this command
docker run --name ct-container -ti -p 8000:8000 -v `pwd`:/code ct-image
oh wait, maybe I replace pwd
with something else. I did not notice that earlier.
I'm not experienced with Docker so I took the most obvious action and copypasted that command into VS Code
Oh! If you leave the backticks in (so leave in -v `pwd`:/code ct-image
), it should put the current directory in for you and Docker should pick it up. It should work on Mac, Windows, and Linux.
though also running docker-compose up
should do more of that wrangling on its own.
I should probably update the docs with that, since I think docker-compose was added and the instructions didn't get updated yet.
The Installation page is NOT HELPFUL
Sorry, let me retrace my steps
docker build -t ct-image .
docker run --name ct-container -ti -p 8000:8000 -v `pwd`:/code ct-image
I haven't had my patience tested this intensely since the first time I learned C++
From the screenshots, it looks like it should be working, but I get that it is not. And from the command you're running, it seems like it should be.
You could replace `pwd `
with your local directory (so it looks like from your screenshots you could do `-v /Users/alexm/source/repos/codethesaur.us:/code
) and see if that works.
Or kill the container, then run docker-compose up
.
I made issue 15 on the docs to update these instructions. If no one jumps on it in a few days, I should have time to update them myself.
docker-compose up
leads to the following error message:
[+] Building 0.1s (2/2) FINISHED
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 32B 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
failed to solve: rpc error: code = Unknown desc = failed to solve with frontend dockerfile.v0: failed to create LLB definition: target stage cthesaurus-img could not be found
I'll test more on this tomorrow. I'm not sure what's going on but I can try to debug it and see what's going on.
Okay, I got docker-compose to work. I modified docker-compose.yml
to look like this:
version: "3"
services:
app:
build:
context: .
dockerfile: Dockerfile
container_name: codethesaurus-container
ports:
- "8000:8000"
volumes:
- ".:/code"
Yeah, that looks about right. I did get it working on my computer, I just didn't push up changes yet. I'll try to get that done tonight or tomorrow. Thanks!
I pushed up a new Dockerfile/docker-compose.yml if that helps! They should be smaller and spin up faster too.
Hey @INeedAUniqueUsername, I figured I'd check in to see how this issue is coming along for you. No rush, but if you're doing Hacktoberfest, it ends in a little over a day, so I figured I'd just remind you.
Oops, I forgot I was going to work on this
lol, that's fine! Do you still want it, or want to unassign? Or just want to keep it just will have to work on it a bit later?
Hey @INeedAUniqueUsername, figured I'd double-check again to see if you're interested in this. If yes, let me know, otherwise I'll probably unassign in the next day or two. And if you have any more questions, let me know!
Haven't heard back so I'm removing them. (If you still want it, let me know and I'll add you back.)
Language you would like added
COBOL a.k.a. Common Business Oriented Language
Information on the language
COBOL is a 60 year old domain-specific language designed for business computing and data processing (e.g. huge databases and financial transactions). It may be useful to learn.
Disclaimer
I'd like to maybe get started on the COBOL thesaurus for Hacktoberfest. I don't have direct experience with COBOL at this time (I'm more of an expert at C# and Lisp) but I've been reading through Michael Coughlan's book, Beginning COBOL for Programmers.
Requirements:
web/thesauruses/_meta/
to a new cobol directory inweb/thesauruses/
"name":
fields before your PR"comment":
if you wish to explain something in the code"not-implemented": "true"
if the concept doesn't exist in the language. You can then delete the"code"
line.Need Help?
Leave a comment on here with your question, or feel free to ask @geekygirlsarah on Twitter. You can also email coreteam@codethesaur.us too.
Thanks!
We really value and appreciate the additions people make to Code Thesaurus, no matter how large or small. So thank you for taking the time to work on this!