mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
Merge pull request #5 from roschaefer/docker
Add Installation with Docker
This commit is contained in:
commit
cb42163799
9
.dockerignore
Normal file
9
.dockerignore
Normal file
@ -0,0 +1,9 @@
|
||||
.vscode/
|
||||
|
||||
node_modules/
|
||||
npm-debug.log
|
||||
|
||||
Dockerfile
|
||||
docker-compose*.yml
|
||||
|
||||
.env
|
||||
18
Dockerfile
Normal file
18
Dockerfile
Normal file
@ -0,0 +1,18 @@
|
||||
FROM node:10-alpine
|
||||
LABEL Description="Server part of the social network Human Connection" Vendor="Human-Connection gGmbH" Version="0.0.1" Maintainer="Human-Connection gGmbH (developer@human-connection.org)"
|
||||
|
||||
# expose the app port
|
||||
EXPOSE 4000
|
||||
|
||||
ARG WORKDIR=/HC-Server
|
||||
|
||||
RUN mkdir -p $WORKDIR
|
||||
WORKDIR $WORKDIR
|
||||
|
||||
COPY package.json .
|
||||
COPY yarn.lock .
|
||||
RUN yarn install --production=false --frozen-lockfile --non-interactive
|
||||
|
||||
COPY . .
|
||||
|
||||
CMD ["yarn", "run", "start"]
|
||||
20
README.md
20
README.md
@ -23,6 +23,26 @@
|
||||
|
||||
## Quick Start
|
||||
|
||||
### Installation with Docker
|
||||
|
||||
Run:
|
||||
```sh
|
||||
docker-compose up
|
||||
# if you want seed data
|
||||
# open another terminal and run
|
||||
docker-compose exec backend yarn run seedDb
|
||||
```
|
||||
|
||||
App is [running on port 4000](http://localhost:4000/)
|
||||
|
||||
To wipe out your neo4j database run:
|
||||
```sh
|
||||
docker-compose down -v
|
||||
```
|
||||
|
||||
|
||||
### Installation without Docker
|
||||
|
||||
Install dependencies:
|
||||
|
||||
```bash
|
||||
|
||||
34
docker-compose.yml
Normal file
34
docker-compose.yml
Normal file
@ -0,0 +1,34 @@
|
||||
version: "3.7"
|
||||
|
||||
services:
|
||||
backend:
|
||||
build: .
|
||||
networks:
|
||||
- hc-network
|
||||
depends_on:
|
||||
- neo4j
|
||||
ports:
|
||||
- 4000:4000
|
||||
environment:
|
||||
- NEO4J_URI=bolt://neo4j:7687
|
||||
- GRAPHQL_LISTEN_PORT=4000
|
||||
- GRAPHQL_URI=http://localhost:4000
|
||||
- CLIENT_URI=http://localhost:3000
|
||||
- JWT_SECRET=b/&&7b78BF&fv/Vd
|
||||
- MOCK=false
|
||||
|
||||
neo4j:
|
||||
image: neo4j:3.4
|
||||
networks:
|
||||
- hc-network
|
||||
volumes:
|
||||
- neo4j-data:/data
|
||||
environment:
|
||||
- NEO4J_AUTH=none
|
||||
|
||||
networks:
|
||||
hc-network:
|
||||
name: hc-network
|
||||
|
||||
volumes:
|
||||
neo4j-data:
|
||||
Loading…
x
Reference in New Issue
Block a user