-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
74 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,15 @@ | ||
# c3data | ||
|
||
|
||
## setup | ||
|
||
``` | ||
docker-compose up postgres | ||
docker exec -i c3data_postgres_1 psql c3data < c3d-graphql/schema.sql | ||
``` | ||
|
||
## usage | ||
|
||
``` | ||
docker-compose up c3d-graphql | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
FROM node:8.9.0 | ||
|
||
WORKDIR /app | ||
|
||
ENV NODE_ENV=production | ||
#ADD package.json yarn.lock .npmrc /app/ | ||
#RUN unset NODE_ENV; yarn install | ||
|
||
ADD . /app/ | ||
|
||
#RUN yarn build | ||
#CMD npx postgraphile -c postgres:///c3data -w -h 0.0.0.0 -p 5000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
FROM node:8.9.0 | ||
|
||
# ARGUMENT DEFINITION | ||
ARG INSTALL_WATCHMAN=false | ||
|
||
WORKDIR /app | ||
|
||
# INSTALL WATCHMAN | ||
ADD ./scripts /app/scripts/ | ||
RUN if [ "$INSTALL_WATCHMAN" = "true" ] ; then ./scripts/installWatchman.sh ; else echo "watchman installation skipped" ; fi | ||
|
||
# INSTALL NODEJS DEPENDENCIES | ||
ENV NODE_ENV=production | ||
ADD package.json yarn.lock .npmrc /app/ | ||
RUN unset NODE_ENV; yarn install | ||
|
||
ADD . /app/ | ||
|
||
RUN yarn build | ||
CMD yarn start |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
version: '3.4' | ||
services: | ||
c3d-web: | ||
build: | ||
context: ./c3d-web | ||
args: | ||
- INSTALL_WATCHMAN=true | ||
depends_on: ['c3d-graphql'] | ||
volumes: ['./c3d-web:/app'] | ||
env_file: ./c3d-web/env.docker | ||
ports: | ||
- 8080:8080 | ||
links: ['c3d-graphql'] | ||
command: yarn start | ||
c3d-graphql: | ||
build: c3d-graphql | ||
depends_on: ['postgres'] | ||
command: npx postgraphile -c "postgres://graphql:graphql@postgres/c3data" --watch | ||
links: ['postgres'] | ||
ports: ['5000:5000'] | ||
postgres: | ||
image: postgres:10.5 | ||
environment: | ||
- POSTGRES_DB=c3data | ||
- POSTGRES_USER=root | ||
- POSTGRES_PASSWORD=root | ||
volumes: ['./data/postgres:/var/lib/postgresql/data'] | ||
ports: ['5432:5432'] |