aboutsummaryrefslogblamecommitdiffstats
path: root/docker-compose.yaml
blob: d2dd1893eef4b542638ee5fda24151359d0dd484 (plain) (tree)
1
2
3
4
5
6
7
8
9
              
         

               


                 

               

                           
                   
            

                                                                                                                                         




                                         





                  
                  














                                                               
         








                                    
version: "3.9"
services:
  blog:
    image: blog
    build:
      context: ./
    networks:
      - blognet
      - dbnet
    restart: unless-stopped
    ports:
      - "9000:9000"
    volumes:
      - /etc/letsencrypt/live/blog.terminaldweller.com-0002/fullchain.pem:/etc/letsencrypt/live/blog.terminaldweller.com/fullchain.pem:ro
      - /etc/letsencrypt/live/blog.terminaldweller.com-0002/privkey.pem:/etc/letsencrypt/live/blog.terminaldweller.com/privkey.pem:ro
    cap_drop:
      - ALL
    environment:
      - SERVER_DEPLOYMENT_TYPE=deployment
      - SERVER_LISTEN_PORT=9000
    depends_on:
      - mongo
    secrets:
      - mongo_user
      - mongo_pass
  mongo:
    image: mongo:6
    networks:
      - dbnet
    restart: on-failure
    ports:
      - "127.0.0.1:27117:27017"
      - "127.0.0.1:27118:27018"
      - "127.0.0.1:27119:27019"
    volumes:
      - blog-data:/data/db
    environment:
      - MONGO_INITDB_ROOT_USERNAME_FILE=/run/secrets/mongo_user
      - MONGO_INITDB_ROOT_PASSWORD_FILE=/run/secrets/mongo_pass
    secrets:
      - mongo_user
      - mongo_pass
networks:
  blognet:
  dbnet:
volumes:
  blog-data:
secrets:
  mongo_user:
    file: ./mongo_secrets/mongo_user
  mongo_pass:
    file: ./mongo_secrets/mongo_pass