Hi Luke,
Thank you for the message.
This is what my `lamp.yml’ file looks like. I censored out the password keys.
[ec2-user@mindlamp ~]$ cat lamp.yml
version: '3.7'
services:
server:
image: ghcr.io/bidmcdigitalpsychiatry/lamp-server:2021
healthcheck:
test: wget --no-verbose --tries=1 --spider http://localhost:3000 || exit 1
environment:
HTTPS: 'off'
ROOT_KEY: 'xxxxx'
CDB: 'http://admin:xxxxx@database:5984/'
PUSH_API_GATEWAY: 'https://app-gateway.lamp.digital/'
PUSH_API_KEY: 'xxxxx'
DASHBOARD_URL: 'dashboard.lamp.digital'
REDIS_HOST: 'redis://cache:6379/0'
NATS_SERVER: 'message_queue:4222'
networks:
- default
- public
logging:
options:
max-size: "10m"
max-file: "3"
deploy:
mode: replicated
update_config:
order: start-first
failure_action: rollback
labels:
traefik.enable: 'true'
traefik.docker.network: 'public'
traefik.http.routers.lamp_server.entryPoints: 'websecure'
traefik.http.routers.lamp_server.rule: 'Host(`api.mindlamp.itpmclean.org`)'
traefik.http.routers.lamp_server.tls.certresolver: 'default'
traefik.http.services.lamp_server.loadbalancer.server.port: 3000
placement:
constraints:
- node.role == manager
database:
image: apache/couchdb:3.1.1
healthcheck:
test: curl --fail --silent http://localhost:5984/_up || exit 1
environment:
COUCHDB_USER: 'admin'
COUCHDB_PASSWORD: 'xxxx'
volumes:
- /data/couchdb:/opt/couchdb/data
networks:
- public
deploy:
mode: replicated
update_config:
order: stop-first
failure_action: rollback
labels:
traefik.enable: 'true'
traefik.http.routers.lamp_database.entryPoints: 'websecure'
traefik.http.routers.lamp_database.rule: 'Host(`db.mindlamp.itpmclean.org`)'
traefik.http.routers.lamp_database.tls.certresolver: 'default'
traefik.http.services.lamp_database.loadbalancer.server.port: 5984
placement:
constraints:
- node.role == manager
cache:
image: redis:6.0.8-alpine
healthcheck:
test: redis-cli ping
deploy:
mode: replicated
update_config:
order: stop-first
failure_action: rollback
placement:
constraints:
- node.role == manager
message_queue:
image: nats:2.1.9-alpine3.12
healthcheck:
test: wget --no-verbose --tries=1 --spider http://localhost:8222/varz || exit 1
deploy:
mode: replicated
update_config:
order: start-first
failure_action: rollback
placement:
constraints:
- node.role == manager
networks:
public:
external: true
then I ran (as instructed in https://docs.lamp.digital/deploy/deploying
):
[ec2-user@mindlamp ~]$ docker stack deploy --compose-file lamp.yml lamp
Updating service lamp_database (id: 1ivnxbhrsntdf8vezmlpvpeqg)
Updating service lamp_cache (id: 9dmdqnrkph3tr6gr52m5564ce)
Updating service lamp_message_queue (id: kixmrlky41hakqc98a281npgm)
Updating service lamp_server (id: sukigeu0ic7lyx59on5xrzjir)
Next, to test this, I tried (Testing the LAMP Platform | LAMP Platform)
# passcode censored
[ec2-user@mindlamp ~]$ curl -k https://admin:xxxxx@db.mindlamp.itpmclean.org/
curl: (6) Could not resolve host: db.mindlamp.itpmclean.org
[ec2-user@mindlamp ~]$ curl -k https://api.mindlamp.itpmclean.org/
curl: (6) Could not resolve host: api.mindlamp.itpmclean.org
I tried the subdomain name pairs below by replacing api.example.com
and db.example.com
accordingly as you suggested but they all don’t seem to work.
`api.mindlamp.itpmclean.org`
`api.itpmclean.org`
`db.mindlamp.itpmclean.org`
`db.itpmclean.org`
What is puzzling to me is that I did not set these db and api domain names in AWS prior to running the lamp.yml file, as they are not instructed in the documentation. The only domain name I set in AWS Route 52 is the hostname, which is described in the documentation. So I am wondering if I have to set api and db domain names somewhere in AWS prior to setting up the lamp.yml
file. If so, I need some guidance on how to do that.
To provide you with more information regarding setting DNS name in AWS Route 53:
[ec2-user@mindlamp ~]$ hostnamectl
Static hostname: mindlamp.itpmclean.org
Screenshot of my AWS Route 53 DNS host page.
I hope I am describing the problem clearly. Thank you Luke for looking into this!
Best,
Yoon