mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-12 23:35:58 +00:00
Change docker repository to develop-backend
- nitro-backend —> develop-backend
This commit is contained in:
parent
b6c8acab36
commit
13c70903e1
@ -5,7 +5,7 @@ EXPOSE 4000
|
||||
CMD ["yarn", "run", "start"]
|
||||
ARG BUILD_COMMIT
|
||||
ENV BUILD_COMMIT=$BUILD_COMMIT
|
||||
ARG WORKDIR=/nitro-backend
|
||||
ARG WORKDIR=/develop-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 /develop-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
|
||||
|
||||
@ -44,7 +44,7 @@ spec:
|
||||
terminationMessagePath: /dev/termination-log
|
||||
terminationMessagePolicy: File
|
||||
volumeMounts:
|
||||
- mountPath: /nitro-backend/public/uploads
|
||||
- mountPath: /develop-backend/public/uploads
|
||||
name: uploads
|
||||
dnsPolicy: ClusterFirst
|
||||
restartPolicy: Always
|
||||
|
||||
@ -7,7 +7,7 @@ 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: ocelotsocialnetwork/nitro-backend
|
||||
backendImage: ocelotsocialnetwork/develop-backend
|
||||
# maintenanceImage is the docker image for the maintenance deployment
|
||||
maintenanceImage: ocelotsocialnetwork/maintenance
|
||||
# neo4jImage is the docker image for the neo4j deployment
|
||||
|
||||
@ -36,7 +36,7 @@ spec:
|
||||
name: configmap
|
||||
- secretRef:
|
||||
name: human-connection
|
||||
image: ocelotsocialnetwork/nitro-backend:latest
|
||||
image: ocelotsocialnetwork/develop-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: /develop-backend/public/uploads
|
||||
name: uploads
|
||||
dnsPolicy: ClusterFirst
|
||||
restartPolicy: Always
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
data:
|
||||
SMTP_HOST: "mailserver.human-connection"
|
||||
SMTP_PORT: "25"
|
||||
GRAPHQL_URI: "http://nitro-backend.human-connection:4000"
|
||||
GRAPHQL_URI: "http://develop-backend.human-connection:4000"
|
||||
NEO4J_URI: "bolt://nitro-neo4j.human-connection:7687"
|
||||
NEO4J_AUTH: "none"
|
||||
CLIENT_URI: "https://nitro-staging.human-connection.org"
|
||||
|
||||
@ -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
|
||||
develop-backend 1/1 1 1 3d11h
|
||||
nitro-neo4j 1/1 1 1 3d11h
|
||||
develop-webapp 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
|
||||
$ kubectl --namespace=human-connection delete deployment develop-backend
|
||||
deployment.extensions "develop-backend" deleted
|
||||
```
|
||||
|
||||
Deploy one-time maintenance-worker pod:
|
||||
|
||||
@ -20,6 +20,6 @@ For example:
|
||||
```text
|
||||
$ minikube service develop-webapp --namespace=human-connection
|
||||
# optionally
|
||||
$ minikube service nitro-backend --namespace=human-connection
|
||||
$ minikube service develop-backend --namespace=human-connection
|
||||
```
|
||||
|
||||
|
||||
@ -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 `/develop-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
|
||||
|
||||
@ -65,7 +65,7 @@ You should see the persistent volumes at the end of the log:
|
||||
|
||||
Restic Backups:
|
||||
Completed:
|
||||
human-connection/nitro-backend-5b6dd96d6b-q77n6: uploads
|
||||
human-connection/develop-backend-5b6dd96d6b-q77n6: uploads
|
||||
human-connection/nitro-neo4j-686d768598-z2vhh: neo4j-data
|
||||
```
|
||||
|
||||
|
||||
@ -11,7 +11,7 @@ services:
|
||||
backend:
|
||||
environment:
|
||||
- "CI=${CI}"
|
||||
image: ocelotsocialnetwork/nitro-backend:build-and-test
|
||||
image: ocelotsocialnetwork/develop-backend:build-and-test
|
||||
build:
|
||||
context: backend
|
||||
target: build-and-test
|
||||
|
||||
@ -22,7 +22,7 @@ services:
|
||||
context: backend
|
||||
target: build-and-test
|
||||
volumes:
|
||||
- ./backend:/nitro-backend
|
||||
- ./backend:/develop-backend
|
||||
command: yarn run dev
|
||||
environment:
|
||||
- SMTP_HOST=mailserver
|
||||
|
||||
@ -22,7 +22,7 @@ services:
|
||||
- GRAPHQL_URI=http://backend:4000
|
||||
- MAPBOX_TOKEN="pk.eyJ1IjoiaHVtYW4tY29ubmVjdGlvbiIsImEiOiJjajl0cnBubGoweTVlM3VwZ2lzNTNud3ZtIn0.bZ8KK9l70omjXbEkkbHGsQ"
|
||||
backend:
|
||||
image: ocelotsocialnetwork/nitro-backend:latest
|
||||
image: ocelotsocialnetwork/develop-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:/develop-backend/node_modules
|
||||
- uploads:/develop-backend/public/uploads
|
||||
environment:
|
||||
- NEO4J_URI=bolt://neo4j:7687
|
||||
- GRAPHQL_URI=http://backend:4000
|
||||
|
||||
@ -4,11 +4,11 @@ ROOT_DIR=$(dirname "$0")/..
|
||||
|
||||
VERSION=$(jq -r '.version' $ROOT_DIR/package.json)
|
||||
IFS='.' read -r major minor patch <<< $VERSION
|
||||
apps=(develop-webapp nitro-backend neo4j maintenance)
|
||||
apps=(develop-webapp develop-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 ocelotsocialnetwork/nitro-backend:latest $ROOT_DIR/backend
|
||||
# docker build --build-arg BUILD_COMMIT=$BUILD_COMMIT --target production -t ocelotsocialnetwork/develop-backend:latest $ROOT_DIR/backend
|
||||
# docker build --build-arg BUILD_COMMIT=$BUILD_COMMIT --target production -t ocelotsocialnetwork/develop-webapp:latest $ROOT_DIR/webapp
|
||||
# docker build --build-arg BUILD_COMMIT=$BUILD_COMMIT -t ocelotsocialnetwork/neo4j:latest $ROOT_DIR/neo4j
|
||||
docker build -t ocelotsocialnetwork/maintenance:latest $ROOT_DIR/webapp/ -f $ROOT_DIR/webapp/Dockerfile.maintenance
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user