mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-12 23:35:58 +00:00
Fix build
Here are the issues * webapp was built with `NODE_ENV=production` but started with `NODE_ENV=development` * using the provided `docker-compose.travis.yml` the command `yarn run start` would look in the wrong folder * removed duplicate environment definition
This commit is contained in:
parent
8bf11b18aa
commit
5cf82d5e18
@ -15,10 +15,10 @@ COPY .env.template .env
|
||||
CMD ["yarn", "run", "start"]
|
||||
|
||||
FROM base as builder
|
||||
RUN yarn install --frozen-lockfile --non-interactive
|
||||
RUN yarn install --production=false --frozen-lockfile --non-interactive
|
||||
COPY . .
|
||||
RUN cp .env.template .env
|
||||
RUN yarn run build
|
||||
RUN NODE_ENV=production yarn run build
|
||||
|
||||
# reduce image size with a multistage build
|
||||
FROM base as production
|
||||
|
||||
@ -15,7 +15,8 @@ services:
|
||||
- ./webapp:/nitro-web
|
||||
- webapp_node_modules:/nitro-web/node_modules
|
||||
command: yarn run dev
|
||||
user: root
|
||||
environment:
|
||||
- NUXT_BUILD=.nuxt-dist # avoid file ownership issues with shared folders
|
||||
factories:
|
||||
image: humanconnection/nitro-backend:builder
|
||||
build:
|
||||
|
||||
@ -14,8 +14,6 @@ services:
|
||||
volumes:
|
||||
#/nitro-web
|
||||
- ./webapp/coverage:/nitro-web/coverage
|
||||
environment:
|
||||
- GRAPHQL_URI=http://backend:4000
|
||||
backend:
|
||||
image: humanconnection/nitro-backend:builder
|
||||
build:
|
||||
|
||||
@ -12,7 +12,6 @@ services:
|
||||
networks:
|
||||
- hc-network
|
||||
environment:
|
||||
- NUXT_BUILD=.nuxt-dist
|
||||
- HOST=0.0.0.0
|
||||
- GRAPHQL_URI=http://backend:4000
|
||||
- MAPBOX_TOKEN="pk.eyJ1IjoiaHVtYW4tY29ubmVjdGlvbiIsImEiOiJjajl0cnBubGoweTVlM3VwZ2lzNTNud3ZtIn0.bZ8KK9l70omjXbEkkbHGsQ"
|
||||
|
||||
@ -19,7 +19,7 @@ COPY . .
|
||||
FROM base as build-and-test
|
||||
RUN cp .env.template .env
|
||||
RUN yarn install --production=false --frozen-lockfile --non-interactive
|
||||
RUN yarn run build
|
||||
RUN NODE_ENV=production yarn run build
|
||||
|
||||
FROM base as production
|
||||
ENV NODE_ENV=production
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user