Skip to content

Instantly share code, notes, and snippets.

@surajsharma
Created March 19, 2025 21:33
Show Gist options
  • Save surajsharma/945dee4bb34142f99dac7cfd33917267 to your computer and use it in GitHub Desktop.
Save surajsharma/945dee4bb34142f99dac7cfd33917267 to your computer and use it in GitHub Desktop.
run postgres with adminer on codespaces
version: "3.8"
services:
postgres:
image: postgres:13-alpine
environment:
POSTGRES_DB: campaigns
POSTGRES_USER: admin
POSTGRES_PASSWORD: admin
ports:
- "5432:5432"
volumes:
- postgres-data:/var/lib/postgresql/data
networks:
- app_network
healthcheck:
test: [ "CMD", "pg_isready", "-U", "admin", "-d", "supertokens" ]
interval: 5s
timeout: 5s
retries: 5
adminer:
image: adminer:latest
restart: always
environment:
ADMINER_DEFAULT_SERVER: postgres
ADMINER_DESIGN: pepa-linha
ports:
- 5050:8080
networks:
- app_network
depends_on:
postgres:
condition: service_healthy
supertokens:
image: registry.supertokens.io/supertokens/supertokens-postgresql:9.1.0
ports:
- 3567:3567
depends_on:
postgres:
condition: service_healthy
environment:
POSTGRESQL_CONNECTION_URI: "postgresql://admin:admin@postgres:5432/supertokens"
networks:
- app_network
restart: unless-stopped
healthcheck:
test: >
bash -c 'exec 3<>/dev/tcp/127.0.0.1/3567 && echo -e "GET /hello HTTP/1.1\r\nhost: 127.0.0.1:3567\r\nConnection: close\r\n\r\n" >&3 && cat <&3 | grep "Hello"'
interval: 10s
timeout: 5s
retries: 5
networks:
app_network:
driver: bridge
volumes:
postgres-data:
pgadmin-data:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment