Remotely docker-compose config with PostgreSQL database
services:
postgres:
image: postgres
restart: unless-stopped
volumes:
- ./pg_data:/var/lib/postgresql/data
environment:
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DB=remotely
- POSTGRES_USER=remotely
remotely:
image: immybot/remotely:latest
restart: unless-stopped
ports:
- 38192:5000
environment:
- ASPNETCORE_ENVIRONMENT=Production
- ASPNETCORE_HTTP_PORTS=5000
- Remotely_ApplicationOptions__DbProvider=PostgreSQL
- Remotely_ConnectionStrings__PostgreSQL=Host=postgres;Database=remotely;Username=remotely;Password=${POSTGRES_PASSWORD};
volumes:
- ./remotely_data:/app/AppData
depends_on:
- postgres
Now create .env
with a random Postgres password:
echo "POSTGRES_PASSWORD=$(pwgen 30 1)" >> .env
Then run docker-compose up -d
to start the services. You can now access Remotely at http://localhost:38192
.