From b40e2521a4956f5784e3a73b1dcbc4c3d5e63b0b Mon Sep 17 00:00:00 2001 From: Derrick Schwabe Date: Wed, 16 Mar 2022 14:07:12 -0600 Subject: WIP updated/new staging pipeline and compose conf --- doc/staging-build.md | 22 ++++++++++++++++++++++ docker-compose.staging.yml | 24 ++++++++++++++++++++++++ staging.Dockerfile | 13 +++++++++++++ 3 files changed, 59 insertions(+) create mode 100644 doc/staging-build.md create mode 100644 docker-compose.staging.yml create mode 100644 staging.Dockerfile diff --git a/doc/staging-build.md b/doc/staging-build.md new file mode 100644 index 00000000..e0a0cfce --- /dev/null +++ b/doc/staging-build.md @@ -0,0 +1,22 @@ +To build staging locally do: + +```bash +docker build -t coinos-server-staging:0.0.1 -f staging.Dockerfile . +``` + + +Also build the UI for staging: + +``` +docker build -t coinos-ui-staging:0.1.0 -f Dockerfile.stage . + +docker run --rm --mount type=bind,source="$(pwd)",destination=/app --user $UID:$GID coinos-ui-staging:0.1.0 pnpm stage +``` + + +To run staging: + +``` +docker-compose -f docker-compose.yml -f docker-compose.dev.yml -f docker-compose.staging.yml up + +``` \ No newline at end of file diff --git a/docker-compose.staging.yml b/docker-compose.staging.yml new file mode 100644 index 00000000..7751367b --- /dev/null +++ b/docker-compose.staging.yml @@ -0,0 +1,24 @@ +version: '3.6' +services: + + ui: + profiles: + - donotstart + + nginx: + depends_on: + - app + image: nginx:1.20.2 + container_name: nginx + volumes: + - type: bind + source: ./config/nginx/default.conf + target: /etc/nginx/conf.d/default.conf + - ../coinos-ui/dist:/coinos + ports: + - 80:80 + +networks: + default: + external: + name: net \ No newline at end of file diff --git a/staging.Dockerfile b/staging.Dockerfile new file mode 100644 index 00000000..8d77e87d --- /dev/null +++ b/staging.Dockerfile @@ -0,0 +1,13 @@ +FROM node:alpine + +ARG NODE_ENV=production +ENV NODE_ENV $NODE_ENV + +RUN apk add git +RUN apk add --update npm +RUN npm i -g pnpm + +COPY . /app +WORKDIR /app + +RUN pnpm i \ No newline at end of file -- cgit v1.2.3