version: "3.3" services: pg: image: postgres:latest environment: POSTGRES_USER: 'mcrates' POSTGRES_DB: 'mcrates' POSTGRES_PASSWORD: 'digdeep' # allow prisma client to push changes from outside docker etc # ufw blocks this from being publicly accessible ports: - '45432:5432' volumes: - "./db:/var/lib/postgresql/data" api: image: node:16 working_dir: /opt/mcrates/api entrypoint: npm start environment: DATABASE_URL: 'postgresql://mcrates:digdeep@pg:5432/mcrates?schema=public' volumes: - "./api:/opt/mcrates/api" nginx: image: nginx:latest volumes: - './nginx/matescrates.au.nginx.conf:/etc/nginx/conf.d/default.conf' - './client/build:/srv/matescrates' - '/etc/letsencrypt:/etc/letsencrypt' ports: - '80:80' - '443:443'