-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add compose-postgres.yaml to allow persistent / scale ak #186
base: main
Are you sure you want to change the base?
Conversation
- POSTGRES_PASSWORD=postgres | ||
ports: | ||
- "5432:5432" | ||
volumes: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we need persistency? I think we could skip the volume part
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you must have persistency with multi instance, that's how state is shared
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
technically we share the same postgres, so you don't have to have persistency
but it is normally expected from postgres to be persistence
so I prefer to have it
environment: | ||
- POSTGRES_USER=postgres | ||
- POSTGRES_PASSWORD=postgres | ||
ports: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
random port? or anything that will prevent with other dockers/ real PG running on the same machine?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it is standard (at least as far as I saw) to expose the standard port
users can change it if they want
not sure what "It uses AK as temporal dev server" means? |
compose-postgres.yaml
Outdated
timeout: 5s | ||
retries: 5 | ||
nginx: | ||
image: nginx:latest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you think it might be worthwhile to pin to a specific version?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
since this is only development / local playground purposes, I don't really care about the version
we don't use any advanced logic here, just basic of the basic and nginx is super stable, so latest == less to maintain
but I'll change it to stable instead of latest to be on the safe side
I didn't want to have a custom docker image to run temporal, I also didn't find any public temporal docker image that runs temporal dev-server since I wanted to reuse the temporal server between all AK instances, I start another ak just to use it's temporal dev-server, the nginx doesn't pass any requests to this ak, only other ak servers talk to this container's temporal instance (and they don't start their own instances) |
1595920
to
1b66758
Compare
ah i see. interesting. you could just install temporal using curl and then run the start-dev though. less... convoluted :p |
you can do the same with postgres and use the other compose file running just ak depends what we want to achieve |
1b66758
to
47f33c8
Compare
oh - can you add redis to the party here? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
now i see that all these files are at root :/ can we put it anywhere else? maybe scripts?
47f33c8
to
d364c0f
Compare
@itayd could you verify it works as expected on your end? if so, please ack the pr regarding location of docker-compose, as far as I saw, it is mostly on the main directory, especially in kind of monorepos, since it might involve multiple components I don't see any value in moving it, I'll move it if you insist |
Start AK with scaled version using compose
docker compose up --scale server=3 # can be any number