From 4209a5243c2705faeac4a33a51157d54d9d8f1de Mon Sep 17 00:00:00 2001 From: Stuart Clark Date: Mon, 5 Sep 2022 01:07:47 +0000 Subject: [PATCH] chore(#439): wip app container --- .docker/Dockerfile.app | 11 +--------- .docker/Dockerfile.storybook | 2 +- .lagoon.yml | 2 +- docker-compose.yml | 40 ++++++++++++++++++------------------ 4 files changed, 23 insertions(+), 32 deletions(-) diff --git a/.docker/Dockerfile.app b/.docker/Dockerfile.app index 0b86433e..ec0552a4 100644 --- a/.docker/Dockerfile.app +++ b/.docker/Dockerfile.app @@ -12,13 +12,4 @@ ENV GITHUB_CLIENT_ID ${GITHUB_CLIENT_ID} ENV GITHUB_CLIENT_SECRET ${GITHUB_CLIENT_SECRET} ENV OAUTH_CLIENT_ID ${OAUTH_CLIENT_ID} -RUN npm run generate - -FROM uselagoon/nginx:latest - -COPY --from=builder /app/dist /app/ - -COPY nginx.conf /etc/nginx/conf.d/app.conf - -ENV HOST 0.0.0.0 -EXPOSE 8080 +CMD ['npm', 'run', 'generate', '&&', 'npm', 'start'] diff --git a/.docker/Dockerfile.storybook b/.docker/Dockerfile.storybook index b0409e1b..98dd838f 100644 --- a/.docker/Dockerfile.storybook +++ b/.docker/Dockerfile.storybook @@ -17,4 +17,4 @@ EXPOSE 3000 WORKDIR /app -CMD ["yarn", "storybook", "-p", "3000"] +CMD ["npm", "run", "storybook", "-p", "3000"] diff --git a/.lagoon.yml b/.lagoon.yml index f20a0e4f..9efeaed7 100644 --- a/.lagoon.yml +++ b/.lagoon.yml @@ -44,7 +44,7 @@ environments: - storybook: - storybook.demo.druxtjs.org - nginx: - - demo-api.druxtjs.org + - demo-api.druxtjs.org cronjobs: - name: drush cron schedule: "*/15 * * * *" diff --git a/docker-compose.yml b/docker-compose.yml index 4d8973a4..6d405af5 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -73,25 +73,25 @@ services: # environment: # << : *default-environment - # app: - # networks: - # - amazeeio-network - # - default - # build: - # context: . - # dockerfile: .docker/Dockerfile.app - # args: - # GITHUB_CLIENT_ID: ${GITHUB_CLIENT_ID} - # GITHUB_CLIENT_SECRET: ${GITHUB_CLIENT_SECRET} - # OAUTH_CLIENT_ID: ${OAUTH_CLIENT_ID} - # labels: - # lagoon.type: nginx - # lando.type: nginx - # volumes: - # - ./nuxt/dist:/app:delegated - # environment: - # LAGOON_LOCALDEV_HTTP_PORT: 8080 - # LAGOON_ROUTE: http://demo-druxtjs-org.docker.amazee.io + app: + networks: + - amazeeio-network + - default + build: + context: . + dockerfile: .docker/Dockerfile.app + args: + GITHUB_CLIENT_ID: ${GITHUB_CLIENT_ID} + GITHUB_CLIENT_SECRET: ${GITHUB_CLIENT_SECRET} + OAUTH_CLIENT_ID: ${OAUTH_CLIENT_ID} + labels: + lagoon.type: node + lando.type: node + volumes: + - ./nuxt/dist:/app:delegated + environment: + LAGOON_LOCALDEV_HTTP_PORT: 3000 + LAGOON_ROUTE: http://demo-druxtjs-org.docker.amazee.io storybook: networks: @@ -110,7 +110,7 @@ services: volumes: - ./nuxt/dist:/app:delegated environment: - LAGOON_LOCALDEV_HTTP_PORT: 3003 + LAGOON_LOCALDEV_HTTP_PORT: 3000 LAGOON_ROUTE: http://storybook-demo-druxtjs-org.docker.amazee.io networks: