-
Notifications
You must be signed in to change notification settings - Fork 27
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
39 lines (35 loc) · 796 Bytes
/
Copy pathdocker-compose.yml
File metadata and controls
39 lines (35 loc) · 796 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
version: '3'
services:
go-service:
build:
context: .
dockerfile: Dockerfile
depends_on:
- database
ports:
- "8080:8080"
environment:
- SERVICES_PROFILE=docker
env_file:
- ./local_docker.env
networks:
- service-network
database:
container_name: example-database
image: postgres:10-alpine
environment:
POSTGRES_USER: "gouser"
POSTGRES_DB: "example"
POSTGRES_HOST_AUTH_METHOD: "trust"
ports:
- 5432:5432
networks:
- service-network
volumes:
- volume-postgres:/var/lib/postgresql/data
- ./pkg/db/init/000_create_extension.sql:/docker-entrypoint-initdb.d/000_create_extension.sql
networks:
service-network:
driver: "bridge"
volumes:
volume-postgres: {}