Skip to content
Snippets Groups Projects
docker-compose.yml 3.73 KiB
Newer Older
version: '2'
    image: registry.forge.grandlyon.com/web-et-numerique/factory/pamn_plateforme-des-acteurs-de-la-mediation-numerique/pamn_server:dev
Hugo SUBTIL's avatar
Hugo SUBTIL committed
    container_name: resin-back
    ports:
      - ${SERVICE_API_BIND_PORT}:3000
Hugo SUBTIL's avatar
Hugo SUBTIL committed
    extra_hosts:
      - 'sen.grandlyon.com:10.128.16.229'
    volumes:
      - ./.migrate:/app/.migrate
    environment:
      MONGO_NON_ROOT_USERNAME: ${MONGO_NON_ROOT_USERNAME}
      MONGO_NON_ROOT_PASSWORD: ${MONGO_NON_ROOT_PASSWORD}
      MONGO_DB_HOST_AND_PORT: ${MONGO_DB_HOST_AND_PORT}
      JWT_SECRET: ${JWT_SECRET}
      SALT: ${SALT}
      MAIL_URL: ${MAIL_URL}
      MAIL_TOKEN: ${MAIL_TOKEN}
      MAIL_SOSTECH: ${MAIL_SOSTECH}
      MAIL_CONTACT: ${MAIL_CONTACT}
      NODE_ENV: ${NODE_ENV}
      GHOST_HOST_AND_PORT: ${GHOST_HOST_AND_PORT}
      GHOST_ADMIN_API_KEY: ${GHOST_ADMIN_API_KEY}
      GHOST_CONTENT_API_KEY: ${GHOST_CONTENT_API_KEY}
      ELASTICSEARCH_NODE: ${ELASTICSEARCH_NODE}
      ELASTICSEARCH_USERNAME: ${ELASTICSEARCH_USERNAME}
      ELASTICSEARCH_PASSWORD: ${ELASTICSEARCH_PASSWORD}
      MC_API_KEY: ${MC_API_KEY}
      MC_SERVER: ${MC_SERVER}
      MC_LIST_ID: ${MC_LIST_ID}
    restart: unless-stopped
    networks:
      - backend
    depends_on:
      - database-ram

  database-ram:
    image: bitnami/mongodb:4.2.3
Hugo SUBTIL's avatar
Hugo SUBTIL committed
    user: root
Hugo SUBTIL's avatar
Hugo SUBTIL committed
    container_name: resin-db
    environment:
      MONGODB_ROOT_PASSWORD: ${MONGO_ROOT_PASSWORD}
      MONGODB_USERNAME: ${MONGO_NON_ROOT_USERNAME}
      MONGODB_PASSWORD: ${MONGO_NON_ROOT_PASSWORD}
      MONGODB_DATABASE: ram
    restart: unless-stopped
    networks:
      - backend
    ports:
      - ${MONGO_PORT}:27017
    volumes:

  mongo-express:
    image: mongo-express
    restart: unless-stopped
Hugo SUBTIL's avatar
Hugo SUBTIL committed
    container_name: resin-mongo-express
    depends_on:
      - database-ram
    networks:
      - backend
    ports:
      - ${ME_PORT}:8081
    environment:
      ME_CONFIG_MONGODB_ADMINUSERNAME: root
      ME_CONFIG_MONGODB_ADMINPASSWORD: ${MONGO_ROOT_PASSWORD}
      ME_CONFIG_BASICAUTH_USERNAME: ${ME_CONFIG_BASICAUTH_USERNAME}
      ME_CONFIG_BASICAUTH_PASSWORD: ${ME_CONFIG_BASICAUTH_PASSWORD}
      ME_CONFIG_MONGODB_SERVER: database-ram

Hugo SUBTIL's avatar
Hugo SUBTIL committed
  ghost:
    platform: linux/x86_64
    image: ghost:5.23.0
Hugo SUBTIL's avatar
Hugo SUBTIL committed
    restart: always
Hugo SUBTIL's avatar
Hugo SUBTIL committed
    container_name: resin-ghost
Hugo SUBTIL's avatar
Hugo SUBTIL committed
    ports:
      - ${GHOST_PORT}:2368
    environment:
      # see https://docs.ghost.org/docs/config#section-running-ghost-with-config-env-variables
      database__client: mysql
      database__connection__host: ghost-db
      database__connection__user: root
      database__connection__password: ${GHOST_DB_PASSWORD}
      database__connection__database: ghost
      # this url value is just an example, and is likely wrong for your environment!
      url: http://localhost:${GHOST_PORT}
Hugo SUBTIL's avatar
Hugo SUBTIL committed
    depends_on:
      - ghost-db
    volumes:
      - ghost-content:/var/lib/ghost/content
Hugo SUBTIL's avatar
Hugo SUBTIL committed

  ghost-db:
    platform: linux/x86_64
Hugo SUBTIL's avatar
Hugo SUBTIL committed
    image: mysql:5.7
Hugo SUBTIL's avatar
Hugo SUBTIL committed
    container_name: resin-ghost-db
Hugo SUBTIL's avatar
Hugo SUBTIL committed
    restart: always
    environment:
      MYSQL_ROOT_PASSWORD: ${GHOST_DB_PASSWORD}
    volumes:
      - db-ghost:/var/lib/mysql
Hugo SUBTIL's avatar
Hugo SUBTIL committed
    image: elasticsearch:7.16.2
Hugo SUBTIL's avatar
Hugo SUBTIL committed
    container_name: resin-es
    environment:
      node.name: es01
      cluster.name: es-docker-cluster
      discovery.type: single-node
      xpack.security.enabled: ${ELASTIC_SECURITY}
      ELASTIC_PASSWORD: ${ELASTICSEARCH_PASSWORD}
      ES_JAVA_OPTS: '-Xms256m -Xmx512m'
      - db-elastic:/usr/share/elasticsearch/data
    networks:
      - elastic
    ports:
      - ${ELASTICSEARCH_PORT}:9200

Hugo SUBTIL's avatar
Hugo SUBTIL committed
  db-ghost: