version: '3' services: db: image: mongo:latest volumes: - ./_dev/db:/data/db networks: - fedilove api: command: sleep infinity build: api/ volumes: - ./api/src:/src environment: - DOMAIN=${DOMAIN} - DB_HOST=${DB_HOST} - DB_NAME=${DB_NAME} working_dir: /src networks: - fedilove web: command: php -S 0.0.0.0:8080 build: web/ volumes: - ./web/src:/src - ./web/data:${DATA_DIR} environment: - DOMAIN=${DOMAIN} - DB_HOST=${DB_HOST} - DB_NAME=${DB_NAME} - DATA_DIR=${DATA_DIR} working_dir: /src networks: - fedilove nginx: command: sh -c "envsubst \"`env | awk -F = '{printf \" $$%s\", $$1}'`\" < /tmp/nginx.template > /etc/nginx/conf.d/default.conf && nginx -g 'daemon off;'" image: nginx:latest volumes: - ./nginx.conf:/tmp/nginx.template:ro - ./web/data:${DATA_DIR}:ro environment: - DATA_DIR=${DATA_DIR} ports: - 127.0.0.1:8080:80 networks: - fedilove networks: fedilove: external: true