updated dockerfiles

this is a mess, i have to come up with something better
This commit is contained in:
wukko
2023-05-19 19:13:48 +06:00
parent 5636a27ff0
commit 19bc17b1dd
4 changed files with 44 additions and 1 deletions

View File

@@ -0,0 +1,39 @@
version: '3.5'
services:
cobalt-api:
build:
context: .
dockerfile: ./docker/dockerfile_api
restart: unless-stopped
container_name: cobalt-api
ports:
- 9000:9000/tcp
environment:
- apiPort=9000
- apiURL='https://co.wuk.sh/'
- cors=1
cobalt-web:
build:
context: .
dockerfile: ./docker/dockerfile_web
restart: unless-stopped
container_name: cobalt-web
ports:
- 9000:9000/tcp
environment:
- apiPort=9000
- apiURL='https://co.wuk.sh/'
- cors=1
cobalt-full:
build:
context: .
dockerfile: ./dockerfile
restart: unless-stopped
container_name: cobalt-full
ports:
- 9000:9000/tcp
environment:
- apiPort=9000
- apiURL='https://co.wuk.sh/'
- cors=1

15
docker/dockerfile_api Normal file
View File

@@ -0,0 +1,15 @@
FROM node:18-bullseye-slim
WORKDIR /app
RUN apt-get update
RUN apt-get install -y git
RUN rm -rf /var/lib/apt/lists/*
COPY package*.json ./
RUN npm install
RUN git clone -n https://github.com/wukko/cobalt.git --depth 1 && mv cobalt/.git ./ && rm -rf cobalt
COPY . .
EXPOSE 9000
CMD [ "node", "src/api" ]

15
docker/dockerfile_web Normal file
View File

@@ -0,0 +1,15 @@
FROM node:18-bullseye-slim
WORKDIR /app
RUN apt-get update
RUN apt-get install -y git
RUN rm -rf /var/lib/apt/lists/*
COPY package*.json ./
RUN npm install
RUN git clone -n https://github.com/wukko/cobalt.git --depth 1 && mv cobalt/.git ./ && rm -rf cobalt
COPY . .
EXPOSE 9000
CMD [ "node", "src/web" ]