Ocelot-Social/docker-compose.yml
roschaefer 10418f061b Various changes to build pipeline
* Use `production` docker images for cypress tests. As one of our contributors
pointed out: It is bad practice to end-to-end test sth. else than the actual
production images.
* Have a dedicated `docker-compose.travis-integration.yml` to test
backend integration tests. The backend *needs* a database when doing
integration tests. So there is no way around using docker-compose. But
we could stop using the `build-and-test` stage when we do cypress tests.
* Remove a couple of unused ports and DRY `docker-compose.override.yml`
* Build and tag all images first and then run `docker-compose .. up` - I
hope this will not rebuild the image.
* Reduce docker image size
2019-09-12 00:29:36 +02:00

64 lines
1.5 KiB
YAML

version: "3.4"
services:
webapp:
image: humanconnection/nitro-web:latest
build:
context: webapp
target: production
ports:
- 3000:3000
networks:
- hc-network
volumes:
- webapp_node_modules:/nitro-web/node_modules
- webapp_nuxt_folder:/nitro-web/.nuxt
environment:
- HOST=0.0.0.0
- GRAPHQL_URI=http://backend:4000
- MAPBOX_TOKEN="pk.eyJ1IjoiaHVtYW4tY29ubmVjdGlvbiIsImEiOiJjajl0cnBubGoweTVlM3VwZ2lzNTNud3ZtIn0.bZ8KK9l70omjXbEkkbHGsQ"
backend:
image: humanconnection/nitro-backend:latest
build:
context: backend
target: production
networks:
- hc-network
depends_on:
- neo4j
ports:
- 4000:4000
volumes:
- backend_node_modules:/nitro-backend/node_modules
- uploads:/nitro-backend/public/uploads
environment:
- NEO4J_URI=bolt://neo4j:7687
- GRAPHQL_PORT=4000
- GRAPHQL_URI=http://localhost:4000
- CLIENT_URI=http://localhost:3000
- JWT_SECRET=b/&&7b78BF&fv/Vd
- MAPBOX_TOKEN=pk.eyJ1IjoiaHVtYW4tY29ubmVjdGlvbiIsImEiOiJjajl0cnBubGoweTVlM3VwZ2lzNTNud3ZtIn0.KZ8KK9l70omjXbEkkbHGsQ
- PRIVATE_KEY_PASSPHRASE=a7dsf78sadg87ad87sfagsadg78
neo4j:
image: humanconnection/neo4j:latest
build:
context: neo4j
networks:
- hc-network
environment:
- NEO4J_AUTH=none
ports:
- 7687:7687
- 7474:7474
volumes:
- neo4j_data:/data
networks:
hc-network:
volumes:
webapp_node_modules:
webapp_nuxt_folder:
backend_node_modules:
neo4j_data:
uploads: