This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "3" | |
services: | |
web-server: | |
build: . | |
depends_on: | |
- database | |
ports: | |
- "4200:5000" | |
entrypoint: "tail -f /dev/null" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM golang:latest | |
# Install tools required for project (postgres, git, gcc, curl, glide) less | |
# likely to change, so put it up here to take advantage of cache | |
RUN apk add postgresql;\ | |
apk add git; \ | |
apk add build-base; \ | |
apk add curl; \ | |
curl https://glide.sh/get | sh; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 1. Absoulute path | |
build: . | |
# 2. Relative path | |
build: ../path/to/app/ | |
# 3. Git repo URL | |
build: https://github.com/docker/rootfs.git | |
# 4. Git repo URL with branch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
POSTGRES_USER=postgres | |
POSTGRES_DB=mydb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
database: | |
image: "postgres:alpine" | |
environment: | |
POSTGRES_USER: postgres | |
POSTGRES_DB: mydb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
database: | |
image: "postgres:alpine" | |
environment: | |
- POSTGRES_USER | |
- POSTGRES_DB |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"errors" | |
"fmt" | |
) | |
func main() { | |
// test out queue | |
var queue Queue |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
database: | |
image: "postgres:alpine" | |
environment: | |
POSTGRES_USER: postgres | |
POSTGRES_DB: mydb | |
ports: | |
- "4201:5432" | |
# persist to a named volume | |
volumes: | |
- server_db:/var/lib/postgresql/data |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "3" | |
services: | |
web-client: | |
build: https://github.com/youraccount/web-client.git | |
ports: | |
- "4210::5000" | |
entrypoint: "npm run dev" | |
web-server: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Base image is Alpine with latest stable Node installed. | |
FROM node:alpine | |
# set working directory for subsequent commands | |
WORKDIR /front-end | |
# leverage build cache by copying npm package files first | |
COPY ./package*.json ./ |
OlderNewer