DeanAyalon / fms-docker

A repository for building Docker containers running FileMaker Server and Devin.fm
2 stars 2 forks source link

[considering] Dev/Staging/Production server containers on the same machine #7

Open DeanAyalon opened 5 months ago

DeanAyalon commented 5 months ago

Will require forwarding a different port for FileMaker to access, or forwarding it through proxy Check if nginx-proxy has the ability to listen on different ports (5003)

Will probably not be ideal for real scenarios, but potentially could help single-machine developers

Current thinking:

services:
  fms${FMS_ENV:+-}${FMS_ENV} # fms OR fms-$FMS_ENV
# alternative: 
  fms-${FMS_ENV:-prod} # cleaner yml but not as nice of a container name

This would lead to an easy quick switch by simply changing the .env file, without compose replacing the container

Alternative

services:
  fms:
    extends: 
      file: compose.base.yml
      service: fms
    profiles:
      - prod
    environment:
      VIRTUAL_HOST: ${DOMAIN}
      # Is there a way to ensure host1.domain:5003 reaches here in nginx-proxy?

  fms-dev:
    ...
  fms-staging:
    ...

Would be messy and require many more environment variables, but may allow for easier control without changing env files

DeanAyalon commented 3 months ago

This may help