mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-12 13:13:45 +01:00
Merge pull request #6211 from overleaf/em-code-sharing
Change directory layout in service containers GitOrigin-RevId: 09ff19db2a123cbf7691d51e9ce9be6eee264287
This commit is contained in:
@@ -4,22 +4,19 @@
|
||||
|
||||
FROM node:14.18.1 as base
|
||||
|
||||
WORKDIR /app
|
||||
COPY install_deps.sh /app
|
||||
WORKDIR /overleaf/services/filestore
|
||||
COPY services/filestore/install_deps.sh /overleaf/services/filestore/
|
||||
RUN chmod 0755 ./install_deps.sh && ./install_deps.sh
|
||||
|
||||
FROM base as app
|
||||
|
||||
#wildcard as some files may not be in all repos
|
||||
COPY package*.json npm-shrink*.json /app/
|
||||
COPY services/filestore/package*.json /overleaf/services/filestore/
|
||||
|
||||
RUN npm ci --quiet
|
||||
|
||||
COPY . /app
|
||||
COPY services/filestore /overleaf/services/filestore
|
||||
|
||||
FROM base
|
||||
|
||||
COPY --from=app /app /app
|
||||
FROM app
|
||||
RUN mkdir -p uploads user_files template_files \
|
||||
&& chown node:node uploads user_files template_files
|
||||
USER node
|
||||
|
||||
@@ -94,12 +94,13 @@ build:
|
||||
--cache-from gcr.io/overleaf-ops/$(PROJECT_NAME):main-deps \
|
||||
--target base \
|
||||
--file Dockerfile \
|
||||
.
|
||||
../..
|
||||
|
||||
docker build --pull --tag ci/$(PROJECT_NAME):$(BRANCH_NAME)-$(BUILD_NUMBER) \
|
||||
--tag gcr.io/overleaf-ops/$(PROJECT_NAME):$(BRANCH_NAME)-$(BUILD_NUMBER) \
|
||||
--cache-from gcr.io/overleaf-ops/$(PROJECT_NAME):$(BRANCH_NAME)-deps \
|
||||
.
|
||||
--file Dockerfile \
|
||||
../..
|
||||
|
||||
tar:
|
||||
$(DOCKER_COMPOSE) up tar
|
||||
|
||||
@@ -6,4 +6,4 @@ filestore
|
||||
--env-pass-through=
|
||||
--node-version=14.18.1
|
||||
--public-repo=True
|
||||
--script-version=3.13.0
|
||||
--script-version=4.0.0
|
||||
|
||||
@@ -7,11 +7,12 @@ version: "2.3"
|
||||
services:
|
||||
test_unit:
|
||||
build:
|
||||
context: .
|
||||
context: ../..
|
||||
dockerfile: services/filestore/Dockerfile
|
||||
target: base
|
||||
volumes:
|
||||
- .:/app
|
||||
working_dir: /app
|
||||
- .:/overleaf/services/filestore
|
||||
working_dir: /overleaf/services/filestore
|
||||
environment:
|
||||
MOCHA_GREP: ${MOCHA_GREP}
|
||||
NODE_ENV: test
|
||||
@@ -21,11 +22,12 @@ services:
|
||||
|
||||
test_acceptance:
|
||||
build:
|
||||
context: .
|
||||
context: ../..
|
||||
dockerfile: services/filestore/Dockerfile
|
||||
target: base
|
||||
volumes:
|
||||
- .:/app
|
||||
working_dir: /app
|
||||
- .:/overleaf/services/filestore
|
||||
working_dir: /overleaf/services/filestore
|
||||
environment:
|
||||
ELASTIC_SEARCH_DSN: es:9200
|
||||
REDIS_HOST: redis
|
||||
|
||||
Reference in New Issue
Block a user