Revert "creates kubernetes friendly deployment"

This reverts commit b42153bcc4.
This commit is contained in:
Ahmed Bouhuolia
2023-10-25 20:59:45 +02:00
parent d313774205
commit c498a100bc
10 changed files with 12 additions and 46 deletions

View File

@@ -27,19 +27,14 @@ services:
webapp:
container_name: bigcapital-webapp
build:
context: ./
dockerfile: packages/webapp/Dockerfile
image: ghcr.io/bigcapitalhq/webapp:latest
deploy:
restart_policy:
condition: unless-stopped
server:
container_name: bigcapital-server
# image: ghcr.io/bigcapitalhq/server:latest
build:
context: ./
dockerfile: packages/server/Dockerfile
image: ghcr.io/bigcapitalhq/server:latest
links:
- mysql
- mongo

View File

@@ -21,7 +21,6 @@ COPY ./docker-entrypoint.sh /docker-entrypoint-initdb.d/docker-initialize.sh
# the mysql user inside the MySQL Docker container.
RUN chown -R mysql:root /docker-entrypoint-initdb.d
RUN chown -R mysql:root /scripts
# RUN chown -R mysql:root /tmp
CMD ["mysqld"]
EXPOSE 3306

View File

@@ -1,3 +1,2 @@
[mysqld]
bind-address = 0.0.0.0
innodb_temp_data_file_path = ../../../tmp/ibtmp1:12M:autoextend
bind-address = 0.0.0.0

View File

@@ -1,4 +1,4 @@
FROM kochie/bigcapital-server:latest as build
FROM ghcr.io/bigcapitalhq/server:latest as build
ARG DB_HOST= \
DB_USER= \

View File

@@ -1,5 +1,5 @@
# Migrate the master system database.
./wait-for-it/wait-for-it.sh ${DB_HOST}:3306 -- node ./build/commands.js system:migrate:latest
./wait-for-it/wait-for-it.sh mysql:3306 -- node ./build/commands.js system:migrate:latest
# Migrate all tenants.
./wait-for-it/wait-for-it.sh ${DB_HOST}:3306 -- node ./build/commands.js tenants:migrate:latest
./wait-for-it/wait-for-it.sh mysql:3306 -- node ./build/commands.js tenants:migrate:latest

View File

@@ -1,4 +1,4 @@
FROM node:16-alpine as build
FROM node:14.20-alpine as build
USER root
@@ -85,23 +85,13 @@ RUN chown node:node /
# Copy application dependency manifests to the container image.
COPY ./package*.json ./
COPY ./pnpm-lock.yaml ./
COPY ./pnpm-workspace.yaml ./
COPY ./packages/server/package*.json ./packages/server/
# RUN curl -fsSL https://get.pnpm.io/install.sh | sh -
RUN npm install -g pnpm
COPY ./lerna.json ./lerna.json
# Install app dependencies for production.
RUN apk update
RUN apk add python3 build-base chromium
# Set PYHTON env
ENV PYTHON=/usr/bin/python3
RUN pnpm install
# RUN npm run bootstrap
RUN npm install
RUN npm run bootstrap
COPY --chown=node:node ./packages/server ./packages/server

View File

@@ -120,7 +120,6 @@ module.exports = {
* Redis storage configuration.
*/
redis: {
url: process.env.REDIS_URL,
port: 6379,
},

View File

@@ -1,4 +1,4 @@
FROM node:16-alpine as build
FROM node:14.15.0 as build
USER root
@@ -7,18 +7,11 @@ WORKDIR /app
# Install dependencies
COPY package*.json ./
COPY lerna.json ./
COPY pnpm-lock.yaml ./
COPY pnpm-workspace.yaml ./
COPY ./packages/webapp/package*.json /app/packages/webapp/
RUN apk update
RUN apk add python3 build-base chromium
ENV PYTHON=/usr/bin/python3
RUN npm install -g pnpm
RUN pnpm install
# RUN npm run bootstrap
RUN npm install
RUN npm run bootstrap
# Build webapp package
COPY ./packages/webapp /app/packages/webapp

View File

@@ -5,10 +5,5 @@ module.exports = {
alias: {
'@': path.resolve(__dirname, 'src'),
},
configure: {
resolve: {
fallback: { path: require.resolve('path-browserify') },
},
},
},
};

View File

@@ -5,8 +5,4 @@ server {
root /usr/share/nginx/html;
try_files $uri /index.html;
}
location /api {
proxy_pass http://localhost:3000;
}
}