Compare commits
3 Commits
4371444fa4
...
72c519a23a
Author | SHA1 | Date | |
---|---|---|---|
72c519a23a | |||
9997cdaeaf | |||
d506a7250a |
@ -1,5 +1,5 @@
|
|||||||
# This configuration file was generated by `ameba --gen-config`
|
# This configuration file was generated by `ameba --gen-config`
|
||||||
# on 2024-07-01 18:57:31 UTC using Ameba version 1.6.1.
|
# on 2024-07-02 16:33:24 UTC using Ameba version 1.6.1.
|
||||||
# The point is for the user to remove these configuration records
|
# The point is for the user to remove these configuration records
|
||||||
# one by one as the reported problems are removed from the code base.
|
# one by one as the reported problems are removed from the code base.
|
||||||
|
|
||||||
@ -21,7 +21,7 @@ Documentation/DocumentationAdmonition:
|
|||||||
Enabled: true
|
Enabled: true
|
||||||
Severity: Warning
|
Severity: Warning
|
||||||
|
|
||||||
# Problems found: 1
|
# Problems found: 3
|
||||||
# Run `ameba --only Naming/BlockParameterName` for details
|
# Run `ameba --only Naming/BlockParameterName` for details
|
||||||
Naming/BlockParameterName:
|
Naming/BlockParameterName:
|
||||||
Description: Disallows non-descriptive block parameter names
|
Description: Disallows non-descriptive block parameter names
|
||||||
@ -29,6 +29,7 @@ Naming/BlockParameterName:
|
|||||||
AllowNamesEndingInNumbers: true
|
AllowNamesEndingInNumbers: true
|
||||||
Excluded:
|
Excluded:
|
||||||
- src/faaso.cr
|
- src/faaso.cr
|
||||||
|
- src/daemon/funkos.cr
|
||||||
AllowedNames:
|
AllowedNames:
|
||||||
- _
|
- _
|
||||||
- e
|
- e
|
||||||
|
@ -25,4 +25,4 @@ COPY --from=build /home/app/bin/faaso-daemon /home/app/bin/faaso /usr/bin/
|
|||||||
RUN mkdir /secrets
|
RUN mkdir /secrets
|
||||||
RUN echo "sarasa" > /secrets/sarlanga
|
RUN echo "sarasa" > /secrets/sarlanga
|
||||||
|
|
||||||
CMD ["/usr/bin/multirun", "faaso-daemon", "tinyproxy -d -c tinyproxy.conf"]
|
CMD ["/usr/bin/multirun", "-v", "faaso-daemon", "tinyproxy -d -c tinyproxy.conf"]
|
||||||
|
2
Makefile
2
Makefile
@ -3,7 +3,7 @@ build: shard.yml $(wildcard src/**/*cr)
|
|||||||
proxy: build
|
proxy: build
|
||||||
docker build . -t faaso-proxy --no-cache
|
docker build . -t faaso-proxy --no-cache
|
||||||
start-proxy:
|
start-proxy:
|
||||||
docker run --network=faaso-net -v /var/run/docker.sock:/var/run/docker.sock -p 8888:8888 faaso-proxy
|
docker run --network=faaso-net -v /var/run/docker.sock:/var/run/docker.sock -v secrets:/home/app/secrets -p 8888:8888 faaso-proxy
|
||||||
|
|
||||||
|
|
||||||
.PHONY: build proxy-image start-proxy
|
.PHONY: build proxy-image start-proxy
|
||||||
|
@ -23,7 +23,7 @@ module Funkos
|
|||||||
funkos.sort! { |a, b| a.name <=> b.name }
|
funkos.sort! { |a, b| a.name <=> b.name }
|
||||||
|
|
||||||
if env.params.query.fetch("format", "json") == "html"
|
if env.params.query.fetch("format", "json") == "html"
|
||||||
render "src/views/funkos.ecr"
|
render "src/views/funkos.ecr"
|
||||||
else
|
else
|
||||||
funkos.to_json
|
funkos.to_json
|
||||||
end
|
end
|
||||||
|
@ -30,7 +30,8 @@ module Proxy
|
|||||||
funkos.sort!
|
funkos.sort!
|
||||||
|
|
||||||
config = %(
|
config = %(
|
||||||
UserName nobody
|
User nobody
|
||||||
|
Group nogroup
|
||||||
Port 8888
|
Port 8888
|
||||||
Listen 0.0.0.0
|
Listen 0.0.0.0
|
||||||
Timeout 600
|
Timeout 600
|
||||||
|
@ -161,12 +161,21 @@ class Funko
|
|||||||
|
|
||||||
# Create a container for this funko
|
# Create a container for this funko
|
||||||
def create_container(autostart : Bool = true) : String
|
def create_container(autostart : Bool = true) : String
|
||||||
|
secrets_mount = "#{Dir.current}/secrets/#{name}"
|
||||||
|
Dir.mkdir_p(secrets_mount)
|
||||||
conf = Docr::Types::CreateContainerConfig.new(
|
conf = Docr::Types::CreateContainerConfig.new(
|
||||||
image: "#{name}:latest",
|
image: "#{name}:latest",
|
||||||
hostname: name,
|
hostname: name,
|
||||||
# Port in the container side
|
# Port in the container side
|
||||||
host_config: Docr::Types::HostConfig.new(
|
host_config: Docr::Types::HostConfig.new(
|
||||||
network_mode: "faaso-net",
|
network_mode: "faaso-net",
|
||||||
|
mounts: [
|
||||||
|
Docr::Types::Mount.new(
|
||||||
|
source: secrets_mount,
|
||||||
|
target: "/secrets",
|
||||||
|
type: "bind"
|
||||||
|
),
|
||||||
|
]
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
|
User nobody
|
||||||
UserName nobody
|
Group nogroup
|
||||||
|
LogLevel Info
|
||||||
Port 8888
|
Port 8888
|
||||||
Listen 0.0.0.0
|
Listen 0.0.0.0
|
||||||
Timeout 600
|
Timeout 600
|
||||||
|
Loading…
Reference in New Issue
Block a user