From 23ae569509f1763f983c387641454de4459f2a91 Mon Sep 17 00:00:00 2001 From: roschaefer Date: Thu, 4 Jun 2020 13:03:49 +0200 Subject: [PATCH] Rename dockerhub organizations ..plus get rid of obsolete prefix `nitro-`. --- backend/Dockerfile | 4 ++-- backend/src/activitypub/NitroDataSource.js | 2 +- .../deployments/deployment-backend.yaml | 2 +- deployment/helm/human-connection/values.yaml | 10 +++++----- .../human-connection/deployment-backend.yaml | 4 ++-- .../human-connection/deployment-neo4j.yaml | 2 +- .../human-connection/deployment-web.yaml | 2 +- .../human-connection/maintenance/README.md | 2 +- .../maintenance/deployment-maintenance.yaml | 2 +- .../templates/configmap.template.yaml | 4 ++-- deployment/legacy-migration/README.md | 20 +++++++++---------- .../legacy-migration/maintenance-worker.yaml | 6 +++--- .../maintenance-worker/Dockerfile | 2 +- deployment/minikube/README.md | 4 ++-- deployment/volumes/README.md | 2 +- .../volumes/neo4j-offline-backup/README.md | 6 +++--- .../volumes/neo4j-online-backup/README.md | 14 ++++++------- deployment/volumes/velero/README.md | 4 ++-- docker-compose.build-and-test.yml | 4 ++-- docker-compose.maintenance.yml | 2 +- docker-compose.override.yml | 6 +++--- docker-compose.yml | 12 +++++------ scripts/docker_push.sh | 14 ++++++------- webapp/Dockerfile | 6 +++--- webapp/Dockerfile.maintenance | 4 ++-- 25 files changed, 70 insertions(+), 70 deletions(-) diff --git a/backend/Dockerfile b/backend/Dockerfile index 957bc6ab5..4b0e73120 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -5,7 +5,7 @@ EXPOSE 4000 CMD ["yarn", "run", "start"] ARG BUILD_COMMIT ENV BUILD_COMMIT=$BUILD_COMMIT -ARG WORKDIR=/nitro-backend +ARG WORKDIR=/backend RUN mkdir -p $WORKDIR WORKDIR $WORKDIR @@ -22,7 +22,7 @@ RUN NODE_ENV=production yarn run build # reduce image size with a multistage build FROM base as production ENV NODE_ENV=production -COPY --from=build-and-test /nitro-backend/dist ./dist +COPY --from=build-and-test /backend/dist ./dist COPY ./public/img/ ./public/img/ COPY ./public/providers.json ./public/providers.json RUN yarn install --production=true --frozen-lockfile --non-interactive --no-cache diff --git a/backend/src/activitypub/NitroDataSource.js b/backend/src/activitypub/NitroDataSource.js index 2df895f58..476c91439 100644 --- a/backend/src/activitypub/NitroDataSource.js +++ b/backend/src/activitypub/NitroDataSource.js @@ -14,7 +14,7 @@ import { InMemoryCache } from 'apollo-cache-inmemory' import fetch from 'node-fetch' import { ApolloClient } from 'apollo-client' import trunc from 'trunc-html' -const debug = require('debug')('ea:nitro-datasource') +const debug = require('debug')('ea:datasource') export default class NitroDataSource { constructor(uri) { diff --git a/deployment/helm/human-connection/templates/deployments/deployment-backend.yaml b/deployment/helm/human-connection/templates/deployments/deployment-backend.yaml index 33aa8a0e0..4d5c34a21 100644 --- a/deployment/helm/human-connection/templates/deployments/deployment-backend.yaml +++ b/deployment/helm/human-connection/templates/deployments/deployment-backend.yaml @@ -44,7 +44,7 @@ spec: terminationMessagePath: /dev/termination-log terminationMessagePolicy: File volumeMounts: - - mountPath: /nitro-backend/public/uploads + - mountPath: /backend/public/uploads name: uploads dnsPolicy: ClusterFirst restartPolicy: Always diff --git a/deployment/helm/human-connection/values.yaml b/deployment/helm/human-connection/values.yaml index f30704f89..7d98e22de 100644 --- a/deployment/helm/human-connection/values.yaml +++ b/deployment/helm/human-connection/values.yaml @@ -7,13 +7,13 @@ dbInitializion: "yarn prod:migrate init" # dbMigrations runs the database migrations in a post-upgrade hook. dbMigrations: "yarn prod:migrate up" # bakendImage is the docker image for the backend deployment -backendImage: humanconnection/nitro-backend +backendImage: schoolsinmotion/backend # maintenanceImage is the docker image for the maintenance deployment -maintenanceImage: humanconnection/maintenance +maintenanceImage: schoolsinmotion/maintenance # neo4jImage is the docker image for the neo4j deployment -neo4jImage: humanconnection/neo4j +neo4jImage: schoolsinmotion/neo4j # webappImage is the docker image for the webapp deployment -webappImage: humanconnection/nitro-web +webappImage: schoolsinmotion/webapp # image configures pullPolicy related to the docker images image: # pullPolicy indicates when, if ever, pods pull a new image from docker hub. @@ -50,4 +50,4 @@ privateKeyPassphrase: "YTdkc2Y3OHNhZGc4N2FkODdzZmFnc2FkZzc4" mapboxToken: "cGsuZXlKMUlqb2lhSFZ0WVc0dFkyOXVibVZqZEdsdmJpSXNJbUVpT2lKamFqbDBjbkJ1Ykdvd2VUVmxNM1Z3WjJsek5UTnVkM1p0SW4wLktaOEtLOWw3MG9talhiRWtrYkhHc1E=" uploadsStorage: "25Gi" neo4jStorage: "5Gi" -developmentMailserverDomain: nitro-mailserver.human-connection.org \ No newline at end of file +developmentMailserverDomain: nitro-mailserver.human-connection.org diff --git a/deployment/human-connection/deployment-backend.yaml b/deployment/human-connection/deployment-backend.yaml index 00aab9ffd..0cfb58558 100644 --- a/deployment/human-connection/deployment-backend.yaml +++ b/deployment/human-connection/deployment-backend.yaml @@ -36,7 +36,7 @@ spec: name: configmap - secretRef: name: human-connection - image: humanconnection/nitro-backend:latest + image: schoolsinmotion/backend:latest imagePullPolicy: Always name: backend ports: @@ -46,7 +46,7 @@ spec: terminationMessagePath: /dev/termination-log terminationMessagePolicy: File volumeMounts: - - mountPath: /nitro-backend/public/uploads + - mountPath: /backend/public/uploads name: uploads dnsPolicy: ClusterFirst restartPolicy: Always diff --git a/deployment/human-connection/deployment-neo4j.yaml b/deployment/human-connection/deployment-neo4j.yaml index 5ff67b1a6..afc08bc40 100644 --- a/deployment/human-connection/deployment-neo4j.yaml +++ b/deployment/human-connection/deployment-neo4j.yaml @@ -31,7 +31,7 @@ spec: - envFrom: - configMapRef: name: configmap - image: humanconnection/neo4j:latest + image: schoolsinmotion/neo4j:latest imagePullPolicy: Always name: neo4j ports: diff --git a/deployment/human-connection/deployment-web.yaml b/deployment/human-connection/deployment-web.yaml index db9c22a1f..019ae590d 100644 --- a/deployment/human-connection/deployment-web.yaml +++ b/deployment/human-connection/deployment-web.yaml @@ -37,7 +37,7 @@ spec: name: configmap - secretRef: name: human-connection - image: humanconnection/nitro-web:latest + image: schoolsinmotion/webapp:latest imagePullPolicy: Always name: web ports: diff --git a/deployment/human-connection/maintenance/README.md b/deployment/human-connection/maintenance/README.md index 02bcb44e2..002aee19f 100644 --- a/deployment/human-connection/maintenance/README.md +++ b/deployment/human-connection/maintenance/README.md @@ -31,7 +31,7 @@ E.g. in file `deployment/digital-ocean/https/ingress.yaml` change the following: paths: - path: / backend: - # serviceName: nitro-web + # serviceName: webapp serviceName: maintenance # servicePort: 3000 servicePort: 80 diff --git a/deployment/human-connection/maintenance/deployment-maintenance.yaml b/deployment/human-connection/maintenance/deployment-maintenance.yaml index fbbeec639..9ea98620d 100644 --- a/deployment/human-connection/maintenance/deployment-maintenance.yaml +++ b/deployment/human-connection/maintenance/deployment-maintenance.yaml @@ -19,7 +19,7 @@ spec: env: - name: HOST value: 0.0.0.0 - image: humanconnection/maintenance:latest + image: schoolsinmotion/maintenance:latest ports: - containerPort: 80 imagePullPolicy: Always diff --git a/deployment/human-connection/templates/configmap.template.yaml b/deployment/human-connection/templates/configmap.template.yaml index ae093e4bd..96693913d 100644 --- a/deployment/human-connection/templates/configmap.template.yaml +++ b/deployment/human-connection/templates/configmap.template.yaml @@ -4,8 +4,8 @@ data: SMTP_HOST: "mailserver.human-connection" SMTP_PORT: "25" - GRAPHQL_URI: "http://nitro-backend.human-connection:4000" - NEO4J_URI: "bolt://nitro-neo4j.human-connection:7687" + GRAPHQL_URI: "http://backend.human-connection:4000" + NEO4J_URI: "bolt://neo4j.human-connection:7687" NEO4J_AUTH: "none" CLIENT_URI: "https://nitro-staging.human-connection.org" NEO4J_apoc_import_file_enabled: "true" diff --git a/deployment/legacy-migration/README.md b/deployment/legacy-migration/README.md index 7e8b6a205..429e55d9d 100644 --- a/deployment/legacy-migration/README.md +++ b/deployment/legacy-migration/README.md @@ -43,13 +43,13 @@ Then temporarily delete backend and database deployments ```bash $ kubectl --namespace=human-connection get deployments NAME READY UP-TO-DATE AVAILABLE AGE -nitro-backend 1/1 1 1 3d11h -nitro-neo4j 1/1 1 1 3d11h -nitro-web 2/2 2 2 73d -$ kubectl --namespace=human-connection delete deployment nitro-neo4j -deployment.extensions "nitro-neo4j" deleted -$ kubectl --namespace=human-connection delete deployment nitro-backend -deployment.extensions "nitro-backend" deleted +backend 1/1 1 1 3d11h +neo4j 1/1 1 1 3d11h +webapp 2/2 2 2 73d +$ kubectl --namespace=human-connection delete deployment neo4j +deployment.extensions "neo4j" deleted +$ kubectl --namespace=human-connection delete deployment backend +deployment.extensions "backend" deleted ``` Deploy one-time maintenance-worker pod: @@ -57,13 +57,13 @@ Deploy one-time maintenance-worker pod: ```bash # in deployment/legacy-migration/ $ kubectl apply -f maintenance-worker.yaml -pod/nitro-maintenance-worker created +pod/maintenance-worker created ``` Import legacy database and uploads: ```bash -$ kubectl --namespace=human-connection exec -it nitro-maintenance-worker bash +$ kubectl --namespace=human-connection exec -it maintenance-worker bash $ import_legacy_db $ import_legacy_uploads $ exit @@ -72,7 +72,7 @@ $ exit Delete the pod when you're done: ```bash -$ kubectl --namespace=human-connection delete pod nitro-maintenance-worker +$ kubectl --namespace=human-connection delete pod maintenance-worker ``` Oh, and of course you have to get those deleted deployments back. One way of diff --git a/deployment/legacy-migration/maintenance-worker.yaml b/deployment/legacy-migration/maintenance-worker.yaml index 37c46ab45..965ec4be8 100644 --- a/deployment/legacy-migration/maintenance-worker.yaml +++ b/deployment/legacy-migration/maintenance-worker.yaml @@ -2,12 +2,12 @@ kind: Pod apiVersion: v1 metadata: - name: nitro-maintenance-worker + name: maintenance-worker namespace: human-connection spec: containers: - - name: nitro-maintenance-worker - image: humanconnection/maintenance-worker:latest + - name: maintenance-worker + image: schoolsinmotion/maintenance-worker:latest imagePullPolicy: Always resources: requests: diff --git a/deployment/legacy-migration/maintenance-worker/Dockerfile b/deployment/legacy-migration/maintenance-worker/Dockerfile index 4502d8d69..c936dff57 100644 --- a/deployment/legacy-migration/maintenance-worker/Dockerfile +++ b/deployment/legacy-migration/maintenance-worker/Dockerfile @@ -1,4 +1,4 @@ -FROM humanconnection/neo4j:latest +FROM schoolsinmotion/neo4j:latest ENV NODE_ENV=maintenance EXPOSE 7687 7474 diff --git a/deployment/minikube/README.md b/deployment/minikube/README.md index 342675b1b..c6d91c54a 100644 --- a/deployment/minikube/README.md +++ b/deployment/minikube/README.md @@ -18,8 +18,8 @@ minikube dashboard, expose the services you want on your host system. For example: ```text -$ minikube service nitro-web --namespace=human-connection +$ minikube service webapp --namespace=human-connection # optionally -$ minikube service nitro-backend --namespace=human-connection +$ minikube service backend --namespace=human-connection ``` diff --git a/deployment/volumes/README.md b/deployment/volumes/README.md index 2d08a34cb..c2de61d65 100644 --- a/deployment/volumes/README.md +++ b/deployment/volumes/README.md @@ -3,7 +3,7 @@ At the moment, the application needs two persistent volumes: * The `/data/` folder where `neo4j` stores its database and -* the folder `/nitro-backend/public/uploads` where the backend stores uploads. +* the folder `/backend/public/uploads` where the backend stores uploads. As a matter of precaution, the persistent volume claims that setup these volumes live in a separate folder. You don't want to accidently loose all your data in diff --git a/deployment/volumes/neo4j-offline-backup/README.md b/deployment/volumes/neo4j-offline-backup/README.md index 5d773714b..de6404d59 100644 --- a/deployment/volumes/neo4j-offline-backup/README.md +++ b/deployment/volumes/neo4j-offline-backup/README.md @@ -29,7 +29,7 @@ database connections left and nobody can access the application. Run the following: ```sh -kubectl --namespace=human-connection edit deployment nitro-neo4j +kubectl --namespace=human-connection edit deployment neo4j ``` Add the following to `spec.template.spec.containers`: @@ -61,7 +61,7 @@ exit # Download the file from the pod to your computer. kubectl cp human-connection/:/root/neo4j-backup ./neo4j-backup ``` -Revert your changes to deployment `nitro-neo4j` which will restart the database. +Revert your changes to deployment `neo4j` which will restart the database. ## Restore a Backup in Kubernetes @@ -79,4 +79,4 @@ kubectl --namespace=human-connection exec -it bash neo4j-admin load --from=/root/neo4j-backup --force exit ``` -Revert your changes to deployment `nitro-neo4j` which will restart the database. +Revert your changes to deployment `neo4j` which will restart the database. diff --git a/deployment/volumes/neo4j-online-backup/README.md b/deployment/volumes/neo4j-online-backup/README.md index f096c769f..e5846db40 100644 --- a/deployment/volumes/neo4j-online-backup/README.md +++ b/deployment/volumes/neo4j-online-backup/README.md @@ -7,7 +7,7 @@ database in a kubernetes cluster. One of the benefits of doing an online backup is that the Neo4j database does not need to be stopped, so there is no downtime. Read [the docs](https://neo4j.com/docs/operations-manual/current/backup/performing/) -To use Neo4j Enterprise you must add this line to your configmap, if using, or your deployment `nitro-neo4j` env. +To use Neo4j Enterprise you must add this line to your configmap, if using, or your deployment `neo4j` env. ``` NEO4J_ACCEPT_LICENSE_AGREEMENT: "yes" @@ -15,18 +15,18 @@ NEO4J_ACCEPT_LICENSE_AGREEMENT: "yes" ## Create a Backup in Kubernetes ```sh -# Backup the database with one command, this will get the nitro-neo4j pod, ssh into it, and run the backup command -kubectl -n=human-connection exec -it $(kubectl -n=human-connection get pods | grep nitro-neo4j | awk '{ print $1 }') -- neo4j-admin backup --backup-dir=/var/lib/neo4j --name=neo4j-backup +# Backup the database with one command, this will get the neo4j pod, ssh into it, and run the backup command +kubectl -n=human-connection exec -it $(kubectl -n=human-connection get pods | grep neo4j | awk '{ print $1 }') -- neo4j-admin backup --backup-dir=/var/lib/neo4j --name=neo4j-backup # Download the file from the pod to your computer. -kubectl cp human-connection/$(kubectl -n=human-connection get pods | grep nitro-neo4j | awk '{ print $1 }'):/var/lib/neo4j/neo4j-backup ./neo4j-backup/ +kubectl cp human-connection/$(kubectl -n=human-connection get pods | grep neo4j | awk '{ print $1 }'):/var/lib/neo4j/neo4j-backup ./neo4j-backup/ ``` -You should now have a backup of the database locally. If you want, you can simulate disaster recovery by sshing into the nitro-neo4j pod, deleting all data and restoring from backup +You should now have a backup of the database locally. If you want, you can simulate disaster recovery by sshing into the neo4j pod, deleting all data and restoring from backup ## Disaster where database data is gone somehow ```sh -kubectl -n=human-connection exec -it $(kubectl -n=human-connection get pods | grep nitro-neo4j |awk '{ print $1 }') bash +kubectl -n=human-connection exec -it $(kubectl -n=human-connection get pods | grep neo4j |awk '{ print $1 }') bash # Enter cypher-shell cypher-shell # Delete all data @@ -54,4 +54,4 @@ kubectl --namespace=human-connection exec -it bash neo4j-admin restore --from=/root/neo4j-backup --force exit ``` -Revert your changes to deployment `nitro-neo4j` which will restart the database. \ No newline at end of file +Revert your changes to deployment `neo4j` which will restart the database. diff --git a/deployment/volumes/velero/README.md b/deployment/volumes/velero/README.md index e469ad117..144017f72 100644 --- a/deployment/volumes/velero/README.md +++ b/deployment/volumes/velero/README.md @@ -65,8 +65,8 @@ You should see the persistent volumes at the end of the log: Restic Backups: Completed: - human-connection/nitro-backend-5b6dd96d6b-q77n6: uploads - human-connection/nitro-neo4j-686d768598-z2vhh: neo4j-data + human-connection/backend-5b6dd96d6b-q77n6: uploads + human-connection/neo4j-686d768598-z2vhh: neo4j-data ``` ## Simulate a Disaster diff --git a/docker-compose.build-and-test.yml b/docker-compose.build-and-test.yml index 27aa9fc6b..34b01cf58 100644 --- a/docker-compose.build-and-test.yml +++ b/docker-compose.build-and-test.yml @@ -4,14 +4,14 @@ services: webapp: environment: - "CI=${CI}" - image: humanconnection/nitro-web:build-and-test + image: schoolsinmotion/webapp:build-and-test build: context: webapp target: build-and-test backend: environment: - "CI=${CI}" - image: humanconnection/nitro-backend:build-and-test + image: schoolsinmotion/backend:build-and-test build: context: backend target: build-and-test diff --git a/docker-compose.maintenance.yml b/docker-compose.maintenance.yml index b6a869c57..1b55c7733 100644 --- a/docker-compose.maintenance.yml +++ b/docker-compose.maintenance.yml @@ -2,7 +2,7 @@ version: "3.4" services: maintenance-worker: - image: humanconnection/maintenance-worker:latest + image: schoolsinmotion/maintenance-worker:latest build: context: deployment/legacy-migration/maintenance-worker volumes: diff --git a/docker-compose.override.yml b/docker-compose.override.yml index 56f13939e..334a96e09 100644 --- a/docker-compose.override.yml +++ b/docker-compose.override.yml @@ -12,7 +12,7 @@ services: context: webapp target: build-and-test volumes: - - ./webapp:/nitro-web + - ./webapp:/webapp environment: - NUXT_BUILD=/tmp/nuxt # avoid file permission issues when `rm -rf .nuxt/` - PUBLIC_REGISTRATION=false @@ -22,7 +22,7 @@ services: context: backend target: build-and-test volumes: - - ./backend:/nitro-backend + - ./backend:/backend command: yarn run dev environment: - SMTP_HOST=mailserver @@ -31,7 +31,7 @@ services: - "DEBUG=${DEBUG}" - PUBLIC_REGISTRATION=false maintenance: - image: humanconnection/maintenance:latest + image: schoolsinmotion/maintenance:latest build: context: webapp dockerfile: Dockerfile.maintenance diff --git a/docker-compose.yml b/docker-compose.yml index 7b0c00163..aaf993b74 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2,7 +2,7 @@ version: "3.4" services: webapp: - image: humanconnection/nitro-web:latest + image: schoolsinmotion/webapp:latest build: context: webapp target: production @@ -16,13 +16,13 @@ services: depends_on: - backend volumes: - - webapp_node_modules:/nitro-web/node_modules + - webapp_node_modules:/webapp/node_modules environment: - HOST=0.0.0.0 - GRAPHQL_URI=http://backend:4000 - MAPBOX_TOKEN="pk.eyJ1IjoiaHVtYW4tY29ubmVjdGlvbiIsImEiOiJjajl0cnBubGoweTVlM3VwZ2lzNTNud3ZtIn0.bZ8KK9l70omjXbEkkbHGsQ" backend: - image: humanconnection/nitro-backend:latest + image: schoolsinmotion/backend:latest build: context: backend target: production @@ -35,8 +35,8 @@ services: ports: - 4000:4000 volumes: - - backend_node_modules:/nitro-backend/node_modules - - uploads:/nitro-backend/public/uploads + - backend_node_modules:/backend/node_modules + - uploads:/backend/public/uploads environment: - NEO4J_URI=bolt://neo4j:7687 - GRAPHQL_URI=http://backend:4000 @@ -46,7 +46,7 @@ services: - PRIVATE_KEY_PASSPHRASE=a7dsf78sadg87ad87sfagsadg78 - "DEBUG=${DEBUG}" neo4j: - image: humanconnection/neo4j:latest + image: schoolsinmotion/neo4j:latest build: context: neo4j args: diff --git a/scripts/docker_push.sh b/scripts/docker_push.sh index 3c746af92..86ebb7301 100755 --- a/scripts/docker_push.sh +++ b/scripts/docker_push.sh @@ -4,26 +4,26 @@ ROOT_DIR=$(dirname "$0")/.. VERSION=$(jq -r '.version' $ROOT_DIR/package.json) IFS='.' read -r major minor patch <<< $VERSION -apps=(nitro-web nitro-backend neo4j maintenance) +apps=(webapp backend neo4j maintenance) tags=($major $major.$minor $major.$minor.$patch) # These three docker images have already been built by now: -# docker build --build-arg BUILD_COMMIT=$BUILD_COMMIT --target production -t humanconnection/nitro-backend:latest $ROOT_DIR/backend -# docker build --build-arg BUILD_COMMIT=$BUILD_COMMIT --target production -t humanconnection/nitro-web:latest $ROOT_DIR/webapp -# docker build --build-arg BUILD_COMMIT=$BUILD_COMMIT -t humanconnection/neo4j:latest $ROOT_DIR/neo4j -docker build -t humanconnection/maintenance:latest $ROOT_DIR/webapp/ -f $ROOT_DIR/webapp/Dockerfile.maintenance +# docker build --build-arg BUILD_COMMIT=$BUILD_COMMIT --target production -t schoolsinmotion/backend:latest $ROOT_DIR/backend +# docker build --build-arg BUILD_COMMIT=$BUILD_COMMIT --target production -t schoolsinmotion/webapp:latest $ROOT_DIR/webapp +# docker build --build-arg BUILD_COMMIT=$BUILD_COMMIT -t schoolsinmotion/neo4j:latest $ROOT_DIR/neo4j +docker build -t schoolsinmotion/maintenance:latest $ROOT_DIR/webapp/ -f $ROOT_DIR/webapp/Dockerfile.maintenance echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin for app in "${apps[@]}" do - SOURCE="humanconnection/${app}:latest" + SOURCE="schoolsinmotion/${app}:latest" echo "docker push $SOURCE" docker push $SOURCE for tag in "${tags[@]}" do - TARGET="humanconnection/${app}:${tag}" + TARGET="schoolsinmotion/${app}:${tag}" if DOCKER_CLI_EXPERIMENTAL=enabled docker manifest inspect $TARGET >/dev/null; then echo "docker image ${TARGET} already present, skipping ..." else diff --git a/webapp/Dockerfile b/webapp/Dockerfile index c5025949b..5f02310e4 100644 --- a/webapp/Dockerfile +++ b/webapp/Dockerfile @@ -7,7 +7,7 @@ CMD ["yarn", "run", "start"] # Expose the app port ARG BUILD_COMMIT ENV BUILD_COMMIT=$BUILD_COMMIT -ARG WORKDIR=/nitro-web +ARG WORKDIR=/webapp RUN mkdir -p $WORKDIR WORKDIR $WORKDIR @@ -25,7 +25,7 @@ RUN NODE_ENV=production yarn run build FROM base as production RUN yarn install --production=true --frozen-lockfile --non-interactive --no-cache -COPY --from=build-and-test ./nitro-web/.nuxt ./.nuxt -COPY --from=build-and-test ./nitro-web/static ./static +COPY --from=build-and-test ./webapp/.nuxt ./.nuxt +COPY --from=build-and-test ./webapp/static ./static COPY nuxt.config.js . COPY locales locales diff --git a/webapp/Dockerfile.maintenance b/webapp/Dockerfile.maintenance index ca4ba37bc..c663e9279 100644 --- a/webapp/Dockerfile.maintenance +++ b/webapp/Dockerfile.maintenance @@ -7,7 +7,7 @@ CMD ["yarn", "run", "start"] # Expose the app port ARG BUILD_COMMIT ENV BUILD_COMMIT=$BUILD_COMMIT -ARG WORKDIR=/nitro-web +ARG WORKDIR=/webapp RUN mkdir -p $WORKDIR WORKDIR $WORKDIR @@ -35,6 +35,6 @@ RUN yarn run generate FROM nginx:alpine -COPY --from=build ./nitro-web/dist/ /usr/share/nginx/html/ +COPY --from=build ./webapp/dist/ /usr/share/nginx/html/ RUN rm /etc/nginx/conf.d/default.conf COPY maintenance/nginx/custom.conf /etc/nginx/conf.d/