First working container
This commit is contained in:
parent
c77aa554c6
commit
7f4ea1fdda
|
@ -0,0 +1,31 @@
|
|||
FROM ubuntu:22.04
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
ENV NVM_DIR /usr/local/nvm
|
||||
ENV NODE_VERSION 18.14.0
|
||||
RUN dpkg --add-architecture i386 \
|
||||
&& apt-get update -y \
|
||||
&& apt-get dist-upgrade -y
|
||||
RUN apt-get install -y \
|
||||
curl \
|
||||
expect \
|
||||
git \
|
||||
make \
|
||||
openjdk-11-jdk \
|
||||
wget \
|
||||
unzip \
|
||||
vim \
|
||||
openssh-client \
|
||||
locales \
|
||||
libarchive-tools \
|
||||
rsync
|
||||
RUN mkdir -p $NVM_DIR\
|
||||
&& mkdir /build \
|
||||
&& cd /build \
|
||||
&& curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash \
|
||||
&& bash $NVM_DIR/nvm.sh
|
||||
ENV NODE_PATH $NVM_DIR/v$NODE_VERSION/lib/node_modules
|
||||
ENV PATH $NVM_DIR/versions/node/v$NODE_VERSION/bin:$PATH
|
||||
COPY tools /opt/tools
|
||||
ENV PATH /opt/tools:$PATH
|
||||
|
||||
CMD /opt/tools/start.sh
|
|
@ -0,0 +1,9 @@
|
|||
#!/bin/bash
|
||||
mkdir -p /app.tmp
|
||||
cd /app.tmp
|
||||
git clone https://gitea.dyomedea.com/Dyomedea/backend.git
|
||||
rsync -av backend/ /app/backend
|
||||
cd /app/backend
|
||||
rm -rf /app.tmp
|
||||
npm install --force
|
||||
npm run dev
|
|
@ -0,0 +1,23 @@
|
|||
version: '3'
|
||||
services:
|
||||
backend:
|
||||
build:
|
||||
context: backend
|
||||
restart: always
|
||||
volumes:
|
||||
- /backend/conf/:/app/backend/conf
|
||||
ports:
|
||||
- 3000:3000
|
||||
environment:
|
||||
- VIRTUAL_HOST=admin.dyomedea.app
|
||||
- VIRTUAL_PORT=3000
|
||||
- LETSENCRYPT_HOST=admin.dyomedea.app
|
||||
- LETSENCRYPT_EMAIL=vdv@dyomedea.com
|
||||
networks:
|
||||
- global
|
||||
|
||||
networks:
|
||||
global:
|
||||
external:
|
||||
name: global
|
||||
|
Loading…
Reference in New Issue