-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose-local.yml
58 lines (54 loc) · 1.58 KB
/
docker-compose-local.yml
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# Build all images and run all containers
# `docker-compose -f docker-compose-local.yml up -d --build --force-recreate`
version: '3.8'
services:
geoblacklight_db:
container_name: geoblacklight_db
image: mysql:8.0
restart: always
command: --default-authentication-plugin=mysql_native_password
environment:
MYSQL_DATABASE: ${MYSQL_DB}
# So you don't have to use root, but you can if you like
MYSQL_USER: ${MYSQL_USER}
# You can use whatever password you like
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
MYSQL_ALLOW_EMPTY_PASSWORD: "true"
ports:
# <Port exposed> : < MySQL Port running inside container>
- ${MYSQL_PORT}
# Where our data will be persisted
volumes:
- './db-data:/var/lib/mysql'
networks:
- gbl-network
geoblacklight_web:
container_name: geoblacklight_web
build:
context: ./
dockerfile: DockerfileLocal
env_file: .env
environment:
RAILS_ENV: ${RAILS_ENV}
volumes:
# App files to work locally
- './app:/home/app/webapp/app'
- './db:/home/app/webapp/db'
- './config:/home/app/webapp/config'
- './spec:/home/app/webapp/spec'
- './.rspec:/home/app/webapp/.rspec'
# Logs
- './log:/home/app/webapp/log'
- './log/nginx:/var/log/nginx'
- './webapp.conf:/etc/nginx/sites-enabled/webapp.conf'
tty: true
ports:
- "3001:3001"
depends_on:
- geoblacklight_db
networks:
- gbl-network
# Create a custom docker network if it does not exist already
networks:
gbl-network:
name: gbl-network