aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDerrick Schwabe <[email protected]>2022-03-16 14:07:12 -0600
committerDerrick Schwabe <[email protected]>2022-03-16 18:25:35 -0600
commitb40e2521a4956f5784e3a73b1dcbc4c3d5e63b0b (patch)
treefcbd230dbb336281b41fa10862f51ac6a21c1c76
parenta1ccd117d778801c320953dcfc27c98488e93a2e (diff)
downloadcoinos-server-b40e2521a4956f5784e3a73b1dcbc4c3d5e63b0b.tar.gz
coinos-server-b40e2521a4956f5784e3a73b1dcbc4c3d5e63b0b.zip
WIP updated/new staging pipeline and compose conf
-rw-r--r--doc/staging-build.md22
-rw-r--r--docker-compose.staging.yml24
-rw-r--r--staging.Dockerfile13
3 files changed, 59 insertions, 0 deletions
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