docker-compose.yml 1.02 KB
Newer Older
TonyFord's avatar
TonyFord committed
1
2
3
version: '3.3'

services:
TonyFord's avatar
TonyFord committed
4

TonyFord's avatar
TonyFord committed
5
6
7
8
  app:
    build:
      context: ./
      args:
TonyFord's avatar
TonyFord committed
9
10
        RUNNER_UID: ${RUNNER_UID:-1000}
        RUNNER_GID: ${RUNNER_GID:-1000}
TonyFord's avatar
TonyFord committed
11
    env_file:
TonyFord's avatar
TonyFord committed
12
      - ${FAIRCOIN_CONF}
TonyFord's avatar
TonyFord committed
13
    container_name: ${CI_PROJECT_NAME:-faircoinexplorer}-app
14
    user: '${RUNNER_UID}:${RUNNER_GID}'
TonyFord's avatar
TonyFord committed
15
    command: sleep inf
16
    network_mode: host
TonyFord's avatar
TonyFord committed
17
18
    depends_on:
      - db
TonyFord's avatar
TonyFord committed
19
    volumes:
TonyFord's avatar
TonyFord committed
20
      - .:/home/faircoin/explorer.kaana.red
TonyFord's avatar
TonyFord committed
21
22
23

  db:
    image: mysql:5.7
TonyFord's avatar
TonyFord committed
24
    container_name: ${CI_PROJECT_NAME:-faircoinexplorer}-mysql
TonyFord's avatar
TonyFord committed
25
26
    restart: always
    environment:
TonyFord's avatar
TonyFord committed
27
      MYSQL_DATABASE: explorer
TonyFord's avatar
TonyFord committed
28
      # So you don't have to use root, but you can if you like
TonyFord's avatar
TonyFord committed
29
      MYSQL_USER: ${MYSQL_USER:-user}
TonyFord's avatar
TonyFord committed
30
      # You can use whatever password you like
TonyFord's avatar
TonyFord committed
31
      MYSQL_PASSWORD: ${MYSQL_PASSWORD:-password}
TonyFord's avatar
TonyFord committed
32
      # Password for root access
TonyFord's avatar
TonyFord committed
33
      MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD:-rootpassword}
TonyFord's avatar
ts    
TonyFord committed
34
    ports:
TonyFord's avatar
TonyFord committed
35
      - ${MYSQL_DATABASE_PORT:-3306}:3306
TonyFord's avatar
ts    
TonyFord committed
36

TonyFord's avatar
TonyFord committed
37
38
    volumes:
      - my-db:/var/lib/mysql
TonyFord's avatar
TonyFord committed
39
      - .:/opt/explorer.kaana.red
TonyFord's avatar
TonyFord committed
40
41
42
# Names our volume
volumes:
  my-db: