Skip to content

Commit d3d25a4

Browse files
authored
Add files via upload
1 parent 4649d5f commit d3d25a4

File tree

2 files changed

+62
-0
lines changed

2 files changed

+62
-0
lines changed

Dockerfile

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
FROM ubuntu:20.04
2+
3+
ADD . /app
4+
WORKDIR /app
5+
6+
# we're gonna be use coachdb from 2nd container
7+
RUN sed -i 's/127.0.0.1/couchdb/g' /app/index.js
8+
RUN sed -i 's/curl -L https:\/\/couchdb.apache.org\/repo\/bintray-pubkey.asc | sudo apt-key add;//g' /app/install/install.sh
9+
RUN sed -i 's/echo "deb https:\/\/apache.bintray.com\/couchdb-deb focal main" | sudo tee -a \/etc\/apt\/sources.list;//g' /app/install/install.sh
10+
RUN sed -i 's/sudo apt update;//g' /app/install/install.sh
11+
RUN sed -i 's/sudo apt install -y couchdb;//g' /app/install/install.sh
12+
13+
RUN apt-get clean
14+
RUN apt-get update
15+
RUN apt-get install sudo -y
16+
RUN apt-get install wget -y
17+
RUN chmod +x /app/tools/*
18+
RUN chmod +x /app/install/install.sh
19+
RUN cd /app/install && ./install.sh
20+

docker-compose.yaml

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
version: "3.8"
2+
3+
services:
4+
vajra:
5+
container_name: vajra
6+
restart: always
7+
working_dir: /app
8+
#volumes:
9+
# - ./:/app
10+
ports:
11+
- "8080:80"
12+
depends_on:
13+
- couchdb
14+
build:
15+
context: .
16+
dockerfile: Dockerfile
17+
command: "npm run start"
18+
networks:
19+
- vajra-network
20+
21+
couchdb:
22+
image: couchdb:3.1.1
23+
environment:
24+
- COUCHDB_USER=admin
25+
- COUCHDB_PASSWORD=hackwithme
26+
ports:
27+
- '5984:5984'
28+
- '4369:4369'
29+
- '9100:9100'
30+
volumes:
31+
- couchdb_data:/opt/couchdb/data
32+
networks:
33+
- vajra-network
34+
35+
36+
volumes:
37+
couchdb_data:
38+
driver: local
39+
40+
41+
networks:
42+
vajra-network:

0 commit comments

Comments
 (0)