File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 33
33
FROM ghcr.io/apeworx/silverback:stable
34
34
USER root
35
35
WORKDIR /app
36
- RUN mkdir -p ./bots && chown harambe:harambe /app/bots
36
+ RUN chown harambe:harambe /app
37
37
USER harambe
38
38
COPY ape-config.yaml .
39
39
COPY requirements.txt .
@@ -144,12 +144,13 @@ def build(generate, path):
144
144
break
145
145
bots .append (file )
146
146
for bot in bots :
147
+ dockerfile_content = DOCKERFILE_CONTENT
147
148
if "__init__" in bot .name :
148
149
docker_filename = f"Dockerfile.{ bot .parent .name } "
150
+ dockerfile_content += f"COPY { path .name } / /app/bot"
149
151
else :
150
152
docker_filename = f"Dockerfile.{ bot .name .replace ('.py' , '' )} "
151
- dockerfile_content = DOCKERFILE_CONTENT
152
- dockerfile_content += f"COPY { path .name } /{ bot .name } bots/bot.py"
153
+ dockerfile_content += f"COPY { path .name } /{ bot .name } /app/bot.py"
153
154
dockerfile_path = Path .cwd () / ".silverback-images" / docker_filename
154
155
dockerfile_path .parent .mkdir (exist_ok = True )
155
156
dockerfile_path .write_text (dockerfile_content .strip () + "\n " )
You can’t perform that action at this time.
0 commit comments