When I access localhost:8080 everything is blank. I started the docker image without -d to see the output and it's a bunch of java errors. Is this image maitained?
What are the errors?
Which docker image did you download? gkiko/streama?
I've just run the command from the streama website:
docker run -d --name=“streama” -p 8080:8080 -p 4000:4000 -v /data:/data -e “MYSQL_HOST=mysqlhost” -e “MYSQL_PORT=3306” -e “MYSQL_DB=streama” -e “MYSQL_USER=streama” -e “MYSQL_PASSWORD=streama” whatever/streama
-------- Original Message --------
On January 28, 2018 3:20 PM, Giorgi Kikolashvili notifications@github.com wrote:
Which docker image did you download?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
The webpage said docker setup is legacy. Can I ask why? It should be one of the priority nowadays.
I have decent knowledge about docker images, shall I help about it?
Can you explain me what is the problem?
Build pipeline creates the image and pushes it under gkiko/streama. Unfortunately, you can't connect external mysql to it. Current version uses in-memory database and files are stored in volatile storage. So restarting the container results in lost data.
The problem is that I can't find a way for Grails to read database connection strings from system variables. (Maybe I should ask on SO 🤔 )
Next thing to support is attached volumes so that video files won't be lost after container is restarted.
I've just quickly get some info from this repository.
"The problem is that I can't find a way for Grails to read database connection strings from system variables. " As I've seen this app is based on spring-boot (grails is top on spring-boot). If it is true, SB can be easily configure in this way. But I don't think it is desirable. Why you want to connect external db? You can embed some fast db into dockerimage too. H2 can be persistent too.
When I hit home I could give you plus information about dockerfile too.
"Next thing to support is attached volumes so that video files won't be lost after container is restarted."
Can you give me info about it, please? Where can I find configuration for upload dir path, or is it fixed?
Oh, I found it. It's on settings page, not in configuration files.
I've finished it, PR is here: #579
If you want to know something, feel free to ask. :)
Docker run string basically something like this:
docker run -it -p 8080:8080 -v data:/data -e ACTIVE_PROFILE=mysql --name=streama streama
The Docker image seems to be working, can we close this issue?
I think documentation is a bit lacking for the docker setup.
If it can help whoever come across this issue here is a docker-compose file that made it for me:
version: '3'
services:
mysql:
image: mysql:5.7.24
environment:
MYSQL_ROOT_PASSWORD: streama_root_password
MYSQL_USER: streama
MYSQL_DATABASE: streama
MYSQL_PASSWORD: streama_password
streama:
image: gkiko/streama:v1.6.0-FINAL
ports:
- 8080:8080
volumes:
- /path/to/local/videos:/data/local
environment:
ACTIVE_PROFILE: mysql
MYSQL_HOST: mysql
MYSQL_PORT: 3306
MYSQL_DB: streama
MYSQL_USER: streama
MYSQL_PASSWORD: streama_password
Just run docker-compose up -d and browse http://localhost:8080
For me the Docker images works at the very beginning but it crashes after around 10 minutes. Does anyone experienced the same issue ?
Do you have any logs of this happening?
On 8 Apr 2019, at 16:34, Sylvain Chateau notifications@github.com wrote:
For me the Docker images works at the very beginning but it crashes after around 10 minutes. Does anyone experienced the same issue ?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
It's because I did not set the mysql correctly.
But the new version (1.6.3) which has just been published does not work anymore
streama_1_9f1e71e69bce | Error: Unable to access jarfile streama.war
streama_1_9f1e71e69bce | Error: Unable to access jarfile streama.war
video_streama_1_9f1e71e69bce exited with code 1
video_streama_1_9f1e71e69bce exited with code 1
Exception in thread Thread-3:
Traceback (most recent call last):
File "site-packages/docker/api/client.py", line 229, in _raise_for_status
File "site-packages/requests/models.py", line 940, in raise_for_status
requests.exceptions.HTTPError: 409 Client Error: Conflict for url: http+docker://localhost/v1.22/containers/216c2f654ffbf7e0583bfe636bcedd1e969685bca605989ed7c55f49d7e4dea8/attach?logs=0&stdout=1&stderr=1&stream=1
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "threading.py", line 916, in _bootstrap_inner
File "threading.py", line 864, in run
File "compose/cli/log_printer.py", line 233, in watch_events
File "compose/container.py", line 206, in attach_log_stream
File "compose/container.py", line 298, in attach
File "site-packages/docker/utils/decorators.py", line 19, in wrapped
File "site-packages/docker/api/container.py", line 57, in attach
File "site-packages/docker/api/client.py", line 366, in _read_from_socket
File "site-packages/docker/api/client.py", line 279, in _get_raw_response_socket
File "site-packages/docker/api/client.py", line 231, in _raise_for_status
File "site-packages/docker/errors.py", line 31, in create_api_error_from_http_exception
docker.errors.APIError: 409 Client Error: Conflict ("b'container 216c2f654ffbf7e0583bfe636bcedd1e969685bca605989ed7c55f49d7e4dea8 is restarting, wait until the container is running'")
Oh sorry.. This was a patch from another community member, he included changes to the dockerfile as well. Ill ask him if he knows anything.
One thing to note: in the new 1.6.3 release, it is a .jar file instead of .war for performance reasons (jar yields faster startup time among other things).
In our dockerfile this was changed to .jar, but if you use a custom dockerfile make sure to change that
Noticed this is still open after running through the ringer myself. The Docker image appears to work, it just needs to have a custom ENTRYPOINT to use the ACTIVE_PROFILE variable.
This is one way to do it, making an entrypoint.sh that pulls the variable during the java call.
FROM gkiko/streama:latest
RUN echo "#!/usr/bin/env bash\njava -Dgrails.env=\$ACTIVE_PROFILE -jar /app/streama/streama.jar" > /app/entrypoint.sh
RUN chmod a+x /app/entrypoint.sh
ENTRYPOINT [ "/app/entrypoint.sh" ]
I'm still using the mysql:5.7 image, and I see that tables are written to the db. No other modifications to the setup, docker-compose file is the same.