Refactor Dockerfile and docker-compose.yml to use new directory structure and update volume paths
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
13
Dockerfile
13
Dockerfile
@@ -1,18 +1,19 @@
|
|||||||
FROM node:14
|
FROM node:14
|
||||||
|
|
||||||
WORKDIR /app/cdn-app-insider
|
WORKDIR /srv/docker/cdn-app-insider
|
||||||
|
|
||||||
COPY package*.json ./
|
COPY package*.json ./
|
||||||
|
|
||||||
RUN npm install
|
RUN npm install
|
||||||
|
|
||||||
|
RUN ln -s /srv/docker/cdn-app-insider/data /cdn-files
|
||||||
|
|
||||||
|
RUN ln -s /srv/docker/cdn-app-insider/cdn-files /data
|
||||||
|
|
||||||
|
RUN ln -s /srv/docker/cdn-app-insider/report /report
|
||||||
|
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
RUN mkdir -p /app/cdn-app-insider/data /app/cdn-app-insider/report /app/cdn-app-insider/cdn-files
|
|
||||||
|
|
||||||
# Create an empty setup.json file
|
|
||||||
RUN touch /app/cdn-app-insider/data/setup.json
|
|
||||||
|
|
||||||
EXPOSE 5053
|
EXPOSE 5053
|
||||||
|
|
||||||
CMD [ "npm", "run", "start" ]
|
CMD [ "npm", "run", "start" ]
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ services:
|
|||||||
ports:
|
ports:
|
||||||
- 5053:5053
|
- 5053:5053
|
||||||
volumes:
|
volumes:
|
||||||
- ./data:/app/cdn-app-insider/data
|
- /data:/srv/docker/cdn-app-insider/data
|
||||||
- ./report:/app/cdn-app-insider/report
|
- /report:/srv/docker/cdn-app-insider/report
|
||||||
- ./cdn-files:/app/cdn-app-insider/cdn-files
|
- /cdn-files:/srv/docker/cdn-app-insider/cdn-files
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
Reference in New Issue
Block a user