Skip to content

Instantly share code, notes, and snippets.

@ziedHamdi
Last active September 17, 2021 10:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ziedHamdi/91c0eca14daf2f6f09b10d86d5b0b868 to your computer and use it in GitHub Desktop.
Save ziedHamdi/91c0eca14daf2f6f09b10d86d5b0b868 to your computer and use it in GitHub Desktop.
# start: docker-compose up (-d for detached mode)
# stop: docker-compose down
version: "3.9"
services:
redis-server:
container_name: redis-server
image: 'redis:6.2-alpine'
networks:
- weally
# ports:
# - "6379:6379"
mongo-server:
container_name: mongo-server
image: mongo:4.4.5
networks:
- weally
# ports:
# - "27017:27017"
volumes:
- type: bind
source: /var/weally/mongodb
target: /data/db
# - /var/weally/mongodb:/data/db
# - ./config/mongodb.conf:/data/configdb
restart: always
graphql_server:
container_name: graphql_server
command: yarn start
networks:
- weally
# ports:
# - "4000:4000"
depends_on:
- mongo-server
- redis-server
image: graphql:${GRAPHQL_SERVER_VERSION}
working_dir: /app
environment:
- NODE_ENV=production
- PORT=$GRAPHQL_SERVER_PORT
- REDIS_HOST=redis-server
- TOKEN_SECRET="weally's-secret-token-that-i-want-to-be-long-at-least-32-characters"
- MAPS_API_KEY="My3ap5K0y"
- MONGO_DB=mongodb://mongo-server:27017/weally
- REDIS_PORT=6379
# graphql_pubsub_server:
# container_name: graphql_pubsub_server
# command: yarn dev-sub
# ports:
# - "4000:4000"
# depends_on:
# - mongo-server
# - redis-server
# image: graphql:0.9.0
# working_dir: /app
# environment:
# - NODE_ENV=production
# - PORT=4000
next_server:
container_name: next_server
image: frontend:${NEXT_SERVER_VERSION}
depends_on:
- graphql_server
# - graphql_pubsub_server
networks:
- weally
working_dir: /front
command: yarn start
ports:
- "3000:3000"
environment:
- NODE_ENV=production
- DATABASE_URL=mongodb://mongo-server:27017/weally
- NEXTAUTH_URL=http://next_server:3000
- NEXT_PUBLIC_BACK_END_URL=http://graphql_server:4000
- NEXT_PUBLIC_BACK_END_PUBSUB_URL=ws://graphql_server:4001/subscribe
- TOKEN_SECRET=weally's-secret-token-that-i-want-to-be-long-at-least-32-characters
- FACEBOOK_ID=513760766074140
- FACEBOOK_SECRET=this1553cr3t
- GOOGLE_ID=wyz.apps.googleusercontent.com
- GOOGLE_SECRET=this15-g-53cr3t
- SUPER_USER_MAIL=not@telling.you
- NEXT_PUBLIC_MAPS_API_KEY=this1553cr3t
networks:
weally:
external: false
name: weally
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment