Skip to content

Instantly share code, notes, and snippets.

@mwlang
Created July 6, 2019 00:30
Show Gist options
  • Save mwlang/ae80c7fd402242cb6cdfcc8bf2a4db7f to your computer and use it in GitHub Desktop.
Save mwlang/ae80c7fd402242cb6cdfcc8bf2a4db7f to your computer and use it in GitHub Desktop.
version: '3'
services:
db:
image: postgres:11.3
environment:
- POSTGRES_DB=maestro
- POSTGRES_USER=lucky
- POSTGRES_PASSWORD=developer
ports:
- 5432:5432
volumes:
- data:/var/lib/postgresql/data
app:
build: .
image: maestro
command: /app/bin/maestro
environment:
- DATABASE_URL=postgres://lucky:developer@db:5432/maestro
- DB_HOST=db
- DB_USERNAME=lucky
- DB_PASSWORD=developer
ports:
- 3000:3000
links:
- db
volumes:
- .:/app
- nodes:/app/node_modules
- shards:/app/lib
depends_on:
- db
volumes:
data:
nodes:
shards:
FROM crystallang/crystal:latest
WORKDIR /app
COPY shard.* /app/
RUN shards install
COPY . /app
RUN crystal build src/maestro.cr -o ./bin/maestro --release
RUN rm -rf /app/node_modules
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment