Browse Source

devx(docker): Fix up paths to scripts for setup.

jackyalcine 4 months ago
parent
commit
4d846f5596
Signed by: Jacky Alciné <yo@jacky.wtf> GPG Key ID: 537A4F904B15268D
3 changed files with 13 additions and 14 deletions
  1. 7
    8
      Dockerfile
  2. 5
    5
      Dockerfile.dev
  3. 1
    1
      docker-compose.yml

+ 7
- 8
Dockerfile View File

@@ -9,23 +9,22 @@ ENV MIX_ENV=${MIX_ENV:-prod} \
9 9
 
10 10
 COPY docker/rootfs/ /
11 11
 
12
-RUN mkdir /tmp/koype-docker
12
+WORKDIR /opt/koype
13
+RUN mkdir -p /opt/koype/docker/scripts
13 14
 COPY docker/rootfs /
14 15
 COPY docker/scripts docker/scripts
15 16
 
16
-RUN sh /tmp/koype-docker/prepare.sh
17
-
18
-WORKDIR /opt/koype
17
+RUN sh /opt/koype/docker/scripts/prepare.sh
19 18
 
20 19
 VOLUME /opt/koype/priv/repo/db
21 20
 COPY package* ./
22 21
 COPY mix* ./
23
-RUN sh /tmp/koype-docker/build.sh
22
+RUN sh /opt/koype/docker/scripts/build.sh
24 23
 
25 24
 COPY . /opt/koype/
26 25
 
27
-RUN sh /tmp/koype-docker/build-post.sh
28
-RUN sh /tmp/koype-docker/cleanup.sh
26
+RUN sh /opt/koype/docker/scripts/build-post.sh
27
+RUN sh /opt/koype/docker/scripts/cleanup.sh
29 28
 
30 29
 SHELL ["/bin/bash"]
31
-CMD ["/tmp/koype-docker/entrypoint.sh"]
30
+CMD ["/opt/koype/docker/scripts/entrypoint.sh"]

+ 5
- 5
Dockerfile.dev View File

@@ -10,15 +10,15 @@ ENV MIX_ENV=${MIX_ENV:-dev} \
10 10
 
11 11
 COPY docker/rootfs/ /
12 12
 
13
-RUN mkdir /tmp/koype-docker
13
+RUN mkdir -p /opt/koype/docker/scripts
14
+WORKDIR /opt/koype
14 15
 COPY docker/rootfs /
15 16
 COPY docker/scripts docker/scripts
16 17
 
17
-RUN sh /tmp/koype-docker/prepare.sh
18
+RUN sh docker/scripts/prepare.sh
18 19
 COPY . /opt/koype/
19 20
 
20
-WORKDIR /opt/koype
21
-RUN sh /tmp/koype-docker/build.sh
21
+RUN sh docker/scripts/build.sh
22 22
 
23 23
 SHELL ["/bin/bash"]
24
-CMD ["/tmp/koype-docker/entrypoint.sh"]
24
+CMD ["docker/scripts/entrypoint.sh"]

+ 1
- 1
docker-compose.yml View File

@@ -68,7 +68,7 @@ services:
68 68
       - ./:/opt/koype/:z
69 69
       - ./priv/repo/db/:/opt/koype/priv/repo/db/:z
70 70
     healthcheck:
71
-      test: ["CMD", "/tmp/koype-docker/healthcheck.sh"]
71
+      test: ["CMD", "/opt/koype/docker/scripts/healthcheck.sh"]
72 72
       interval: 60s
73 73
       timeout: 5s
74 74
       retries: 5

Loading…
Cancel
Save